|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.axis.wsdl.fromJava.Types
Description:
This class is used to recursively serializes a Java Class into an XML Schema representation. It has utility methods to create a schema node, assosiate namespaces to the various types
Field Summary | |
protected static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
Types(javax.wsdl.Definition def,
TypeMapping tm,
TypeMapping defaultTM,
Namespaces namespaces,
java.lang.String targetNamespace,
java.util.List stopClasses)
This class serailizes a Class to XML Schema. |
Method Summary | |
org.w3c.dom.Element |
createAttributeElement(java.lang.String elementName,
java.lang.String elementType,
boolean nullable,
org.w3c.dom.Document docHolder)
Create Attribute Element with a given name and type |
org.w3c.dom.Element |
createElement(java.lang.String elementName)
Create a DOM Element in this context |
org.w3c.dom.Element |
createElement(java.lang.String elementName,
java.lang.String elementType,
boolean nullable,
boolean omittable,
org.w3c.dom.Document docHolder)
Create Element with a given name and type |
static java.lang.String |
getLocalNameFromFullName(java.lang.String full)
Utility method to get the local class name from a fully qualified java class name |
static java.lang.String |
getPackageNameFromFullName(java.lang.String full)
Utility method to get the package name from a fully qualified java class name |
java.util.List |
getStopClasses()
Return the list of classes that we should not emit WSDL for. |
QName |
getTypeQName(java.lang.Class javaType)
Return the QName of the specified javaType |
void |
insertTypesFragment(org.w3c.dom.Document doc)
Inserts the type fragment into the given wsdl document |
boolean |
isAcceptableAsAttribute(java.lang.Class type)
Is the given class acceptable as an attribute |
protected boolean |
isBeanCompatible(java.lang.Class javaType,
boolean issueErrors)
isBeanCompatible |
static boolean |
isEnumClass(java.lang.Class cls)
Returns true if indicated type matches the JAX-RPC enumeration class. |
boolean |
isNullable(java.lang.Class type)
Determines if the field is nullable. |
void |
loadInputTypes(java.lang.String inputWSDL)
Load the types from the input wsdl file. |
QName |
writePartType(java.lang.Class type,
QName qname)
Serialize the Class as XML schema to the document. |
void |
writeSchemaElement(QName qName,
org.w3c.dom.Element element)
Write out the given Element into the appropriate schema node. |
java.lang.String |
writeType(java.lang.Class type)
Write a schema representation for the given Class . |
java.lang.String |
writeType(java.lang.Class type,
QName qName)
Write a schema representation for the given Class . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
Constructor Detail |
public Types(javax.wsdl.Definition def, TypeMapping tm, TypeMapping defaultTM, Namespaces namespaces, java.lang.String targetNamespace, java.util.List stopClasses)
Class
to XML Schema. The constructor
provides the context for the streamed node within the WSDL documentdef
- WSDL Definition Element to declare namespacestm
- TypeMappingRegistry to handle known typesdefaultTM
- default TMnamespaces
- user defined or autogenerated namespace and prefix mapstargetNamespace
- targetNamespace of the documentMethod Detail |
public void loadInputTypes(java.lang.String inputWSDL) throws java.io.IOException, javax.wsdl.WSDLException
inputWSDL
- file or URLpublic QName writePartType(java.lang.Class type, QName qname) throws AxisFault
type
- Class
to generate the XML Schema info forpublic QName getTypeQName(java.lang.Class javaType)
javaType
- input javaType Classpublic static java.lang.String getPackageNameFromFullName(java.lang.String full)
full
- input class namepublic static java.lang.String getLocalNameFromFullName(java.lang.String full)
full
- input class namepublic void writeSchemaElement(QName qName, org.w3c.dom.Element element)
qName
- qName to get the namespace of the schema nodeelement
- the Element to append to the Schema nodepublic java.lang.String writeType(java.lang.Class type) throws AxisFault
Class
. Recurse
through all the public fields as well as fields represented by java
bean compliant accessor methods.
Then return the qualified string representation of the generated typetype
- Class for which to generate schemapublic java.lang.String writeType(java.lang.Class type, QName qName) throws AxisFault
Class
. Recurse
through all the public fields as well as fields represented by java
bean compliant accessor methods.
Then return the qualified string representation of the generated typetype
- Class for which to generate schemaqName
- of the type to writepublic static boolean isEnumClass(java.lang.Class cls)
public org.w3c.dom.Element createElement(java.lang.String elementName, java.lang.String elementType, boolean nullable, boolean omittable, org.w3c.dom.Document docHolder)
elementName
- the name of the created elementelementType
- schema type representation of the elementnullable
- nullable attribute of the elementpublic org.w3c.dom.Element createAttributeElement(java.lang.String elementName, java.lang.String elementType, boolean nullable, org.w3c.dom.Document docHolder)
elementName
- the name of the created elementelementType
- schema type representation of the elementnullable
- nullable attribute of the elementpublic boolean isAcceptableAsAttribute(java.lang.Class type)
type
- input Classpublic boolean isNullable(java.lang.Class type)
type
- input Classpublic void insertTypesFragment(org.w3c.dom.Document doc)
doc
- public java.util.List getStopClasses()
public org.w3c.dom.Element createElement(java.lang.String elementName)
protected boolean isBeanCompatible(java.lang.Class javaType, boolean issueErrors)
javaType
- ClassissueErrors
- if true, issue messages if not compatible
Returns true if it appears that this class is a bean and
can be mapped to a complexType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |