|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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
Constructor Summary | |
Types(javax.wsdl.Definition def,
TypeMapping tm,
TypeMapping defaultTM,
Namespaces namespaces,
String targetNamespace,
List stopClasses,
ServiceDesc serviceDesc)
This class serailizes a Class to XML Schema. |
Method Summary | |
Element |
createArrayElement(String componentTypeName)
|
Element |
createAttributeElement(String elementName,
Class javaType,
javax.xml.namespace.QName xmlType,
boolean nullable,
Document docHolder)
Create Attribute Element with a given name and type |
Element |
createElement(String elementName)
Create a DOM Element in this context |
Element |
createElement(String elementName,
String elementType,
boolean nullable,
boolean omittable,
Document docHolder)
Create Element with a given name and type |
Element |
createElementDecl(String name,
Class javaType,
javax.xml.namespace.QName typeQName,
boolean nillable,
boolean omittable)
Create Element |
Element |
createElementWithAnonymousType(String elementName,
Class fieldType,
boolean omittable,
Document ownerDocument)
Write an <element> with an anonymous internal ComplexType |
static String |
getLocalNameFromFullName(String full)
Utility method to get the local class name from a fully qualified java class name |
Namespaces |
getNamespaces()
Return the namespaces object for the current context |
static String |
getPackageNameFromFullName(String full)
Utility method to get the package name from a fully qualified java class name |
String |
getQNameString(javax.xml.namespace.QName qname)
Return a string suitable for representing a given QName in the context of this WSDL document. |
List |
getStopClasses()
Return the list of classes that we should not emit WSDL for. |
javax.xml.namespace.QName |
getTypeQName(Class javaType)
Return the QName of the specified javaType |
void |
insertTypesFragment(Document doc)
Inserts the type fragment into the given wsdl document |
boolean |
isAcceptableAsAttribute(Class type)
Is the given class acceptable as an attribute |
static boolean |
isEnumClass(Class cls)
Returns true if indicated type matches the JAX-RPC enumeration class. |
boolean |
isNullable(Class type)
Determines if the field is nullable. |
void |
loadInputSchema(String inputSchema)
Loads the types from the input schema file. |
void |
loadInputTypes(String inputWSDL)
Load the types from the input wsdl file. |
void |
updateNamespaces()
|
javax.xml.namespace.QName |
writeElementForPart(Class type,
javax.xml.namespace.QName qname)
Write out an element referenced by a part element attribute. |
Element |
writeEnumType(javax.xml.namespace.QName qName,
Class cls)
Write Enumeration Complex Type (Only supports enumeration classes of string types) |
void |
writeSchemaElement(javax.xml.namespace.QName qName,
Element element)
Write out the given Element into the appropriate schema node. |
String |
writeType(Class type)
Write a schema representation for the given Class . |
String |
writeType(Class type,
javax.xml.namespace.QName qName)
Write a schema representation for the given Class . |
javax.xml.namespace.QName |
writeTypeForPart(Class type,
javax.xml.namespace.QName qname)
Write out a type referenced by a part type attribute. |
void |
writeWrappedParameter(Element sequence,
String name,
javax.xml.namespace.QName type,
Class javaType)
Write a parameter (a sub-element) into a sequence generated by writeWrapperElement() above. |
Element |
writeWrapperElement(javax.xml.namespace.QName qname,
boolean request,
boolean hasParams)
Write the element definition for a WRAPPED operation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Types(javax.wsdl.Definition def, TypeMapping tm, TypeMapping defaultTM, Namespaces namespaces, String targetNamespace, List stopClasses, ServiceDesc serviceDesc)
Class
to XML Schema. The constructor
provides the context for the streamed node within the WSDL document
def
- 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 Namespaces getNamespaces()
public void loadInputSchema(String inputSchema) throws IOException, javax.wsdl.WSDLException, SAXException, ParserConfigurationException
inputSchema
- file or URL
IOException
javax.wsdl.WSDLException
SAXException
ParserConfigurationException
public void loadInputTypes(String inputWSDL) throws IOException, javax.wsdl.WSDLException, SAXException, ParserConfigurationException
inputWSDL
- file or URL
IOException
javax.wsdl.WSDLException
SAXException
ParserConfigurationException
public javax.xml.namespace.QName writeTypeForPart(Class type, javax.xml.namespace.QName qname) throws AxisFault
type
- Class
to generate the XML Schema info forqname
- QName
of the type. If null, qname is
defaulted from the class.
AxisFault
public javax.xml.namespace.QName writeElementForPart(Class type, javax.xml.namespace.QName qname) throws AxisFault
type
- Class
to generate the XML Schema info forqname
- QName
of the element. If null, qname is
defaulted from the class.
AxisFault
public Element writeWrapperElement(javax.xml.namespace.QName qname, boolean request, boolean hasParams) throws AxisFault
qname
- the desired element QNamerequest
- true if we're writing the request wrapper, false if
writing the response.hasParams
- true if there are parameters, and thus a sequence
node is needed
AxisFault
public void writeWrappedParameter(Element sequence, String name, javax.xml.namespace.QName type, Class javaType) throws AxisFault
sequence
- the <sequence> in which we're writingname
- is the name of an element to add to the wrapper element.type
- is the QName of the type of the element.
AxisFault
public javax.xml.namespace.QName getTypeQName(Class javaType)
javaType
- input javaType Class
public String getQNameString(javax.xml.namespace.QName qname)
qname
- a QName (typically a type)
public static String getPackageNameFromFullName(String full)
full
- input class name
public static String getLocalNameFromFullName(String full)
full
- input class name
public void writeSchemaElement(javax.xml.namespace.QName qName, Element element) throws AxisFault
qName
- qName to get the namespace of the schema nodeelement
- the Element to append to the Schema node
AxisFault
public String writeType(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 type
type
- Class for which to generate schema
AxisFault
public String writeType(Class type, javax.xml.namespace.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 type
type
- Class for which to generate schemaqName
- of the type to write
AxisFault
public Element createArrayElement(String componentTypeName)
public static boolean isEnumClass(Class cls)
public Element writeEnumType(javax.xml.namespace.QName qName, Class cls) throws NoSuchMethodException, IllegalAccessException, AxisFault
qName
- QName of type.cls
- class of type
NoSuchMethodException
IllegalAccessException
AxisFault
public Element createElementDecl(String name, Class javaType, javax.xml.namespace.QName typeQName, boolean nillable, boolean omittable) throws AxisFault
nillable
- nillable attribute of the element
AxisFault
public Element createElement(String elementName, String elementType, boolean nullable, boolean omittable, Document docHolder)
elementName
- the name of the created elementelementType
- schema type representation of the elementnullable
- nullable attribute of the element
public Element createAttributeElement(String elementName, Class javaType, javax.xml.namespace.QName xmlType, boolean nullable, Document docHolder) throws AxisFault
elementName
- the name of the created elementnullable
- nullable attribute of the element
AxisFault
public boolean isAcceptableAsAttribute(Class type)
type
- input Class
public boolean isNullable(Class type)
type
- input Class
public void updateNamespaces()
public void insertTypesFragment(Document doc)
doc
- public List getStopClasses()
public Element createElement(String elementName)
public Element createElementWithAnonymousType(String elementName, Class fieldType, boolean omittable, Document ownerDocument) throws AxisFault
elementName
- fieldType
- omittable
- ownerDocument
-
AxisFault
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |