|
||||||||||
| PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.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(Definition def,
TypeMapping (src) tm,
TypeMapping (src) defaultTM,
Namespaces (src) namespaces,
java.lang.String targetNamespace,
java.util.List stopClasses,
ServiceDesc (src) serviceDesc)
This class serailizes a Class to XML Schema. |
|
| Method Summary | |
org.w3c.dom.Element |
createArrayElement(java.lang.String componentTypeName)
|
org.w3c.dom.Element |
createAttributeElement(java.lang.String elementName,
java.lang.Class javaType,
QName (src) xmlType,
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 |
org.w3c.dom.Element |
createElementDecl(java.lang.String name,
java.lang.Class javaType,
QName (src) typeQName,
boolean nillable,
boolean omittable)
Create Element |
org.w3c.dom.Element |
createElementWithAnonymousType(java.lang.String elementName,
java.lang.Class fieldType,
boolean omittable,
org.w3c.dom.Document ownerDocument)
Write an <element> with an anonymous internal ComplexType |
static java.lang.String |
getLocalNameFromFullName(java.lang.String full)
Utility method to get the local class name from a fully qualified java class name |
Namespaces (src) |
getNamespaces()
Return the namespaces object for the current context |
static java.lang.String |
getPackageNameFromFullName(java.lang.String full)
Utility method to get the package name from a fully qualified java class name |
java.lang.String |
getQNameString(QName (src) qname)
Return a string suitable for representing a given QName in the context of this WSDL document. |
java.util.List |
getStopClasses()
Return the list of classes that we should not emit WSDL for. |
QName (src) |
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 |
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 |
loadInputSchema(java.lang.String inputSchema)
Loads the types from the input schema file. |
void |
loadInputTypes(java.lang.String inputWSDL)
Load the types from the input wsdl file. |
void |
updateNamespaces()
|
QName (src) |
writeElementForPart(java.lang.Class type,
QName (src) qname)
Write out an element referenced by a part element attribute. |
org.w3c.dom.Element |
writeEnumType(QName (src) qName,
java.lang.Class cls)
Write Enumeration Complex Type (Only supports enumeration classes of string types) |
void |
writeSchemaElement(QName (src) 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 (src) qName)
Write a schema representation for the given Class. |
QName (src) |
writeTypeForPart(java.lang.Class type,
QName (src) qname)
Write out a type referenced by a part type attribute. |
void |
writeWrappedParameter(org.w3c.dom.Element sequence,
java.lang.String name,
QName (src) type,
java.lang.Class javaType)
Write a parameter (a sub-element) into a sequence generated by writeWrapperElement() above. |
org.w3c.dom.Element |
writeWrapperElement(QName (src) 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(Definition def,
TypeMapping (src) tm,
TypeMapping (src) defaultTM,
Namespaces (src) namespaces,
java.lang.String targetNamespace,
java.util.List stopClasses,
ServiceDesc (src) 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 document| Method Detail |
public Namespaces (src) getNamespaces()
public void loadInputSchema(java.lang.String inputSchema)
throws java.io.IOException,
WSDLException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
inputSchema - file or URL
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void loadInputTypes(java.lang.String inputWSDL)
throws java.io.IOException,
WSDLException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
inputWSDL - file or URL
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public QName (src) writeTypeForPart(java.lang.Class type,
QName (src) qname)
throws AxisFault (src)
type - Class to generate the XML Schema info forqname - QName of the type. If null, qname is
defaulted from the class.
AxisFault (src)
public QName (src) writeElementForPart(java.lang.Class type,
QName (src) qname)
throws AxisFault (src)
type - Class to generate the XML Schema info forqname - QName of the element. If null, qname is
defaulted from the class.
AxisFault (src)
public org.w3c.dom.Element writeWrapperElement(QName (src) qname,
boolean request,
boolean hasParams)
throws AxisFault (src)
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 (src)
public void writeWrappedParameter(org.w3c.dom.Element sequence,
java.lang.String name,
QName (src) type,
java.lang.Class javaType)
throws AxisFault (src)
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 (src) public QName (src) getTypeQName(java.lang.Class javaType)
javaType - input javaType Class
public java.lang.String getQNameString(QName (src) qname)
qname - a QName (typically a type)
public static java.lang.String getPackageNameFromFullName(java.lang.String full)
full - input class name
public static java.lang.String getLocalNameFromFullName(java.lang.String full)
full - input class name
public void writeSchemaElement(QName (src) qName,
org.w3c.dom.Element element)
throws AxisFault (src)
qName - qName to get the namespace of the schema nodeelement - the Element to append to the Schema node
AxisFault (src)
public java.lang.String writeType(java.lang.Class type)
throws AxisFault (src)
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 (src)
public java.lang.String writeType(java.lang.Class type,
QName (src) qName)
throws AxisFault (src)
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 (src) public org.w3c.dom.Element createArrayElement(java.lang.String componentTypeName)
public static boolean isEnumClass(java.lang.Class cls)
public org.w3c.dom.Element writeEnumType(QName (src) qName,
java.lang.Class cls)
throws java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
AxisFault (src)
qName - QName of type.cls - class of type
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
AxisFault (src)
public org.w3c.dom.Element createElementDecl(java.lang.String name,
java.lang.Class javaType,
QName (src) typeQName,
boolean nillable,
boolean omittable)
throws AxisFault (src)
nillable - nillable attribute of the element
AxisFault (src)
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 element
public org.w3c.dom.Element createAttributeElement(java.lang.String elementName,
java.lang.Class javaType,
QName (src) xmlType,
boolean nullable,
org.w3c.dom.Document docHolder)
throws AxisFault (src)
elementName - the name of the created elementnullable - nullable attribute of the element
AxisFault (src) public boolean isAcceptableAsAttribute(java.lang.Class type)
type - input Class
public boolean isNullable(java.lang.Class type)
type - input Class
public void updateNamespaces()
public void insertTypesFragment(org.w3c.dom.Document doc)
doc - public java.util.List getStopClasses()
public org.w3c.dom.Element createElement(java.lang.String elementName)
public org.w3c.dom.Element createElementWithAnonymousType(java.lang.String elementName,
java.lang.Class fieldType,
boolean omittable,
org.w3c.dom.Document ownerDocument)
throws AxisFault (src)
elementName - fieldType - omittable - ownerDocument -
AxisFault (src)
|
||||||||||
| PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||