Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis2.description.java2wsdl
Class DefaultSchemaGenerator

    java.lang.Object
      org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator

All Implemented Interfaces:
  Java2WSDLConstants, SchemaGenerator

Direct Known Subclasses:
  DocLitBareSchemaGenerator

    public class DefaultSchemaGenerator

extends java.lang.Object
implements Java2WSDLConstants, SchemaGenerator

Nested Class Summary
`class` | `DefaultSchemaGenerator.MathodComparator`
`class` | `DefaultSchemaGenerator.PropertyComparator`

Field Summary
`protected java.lang.String` | `attrFormDefault`
`protected java.lang.ClassLoader` | `classLoader`
`protected java.lang.String` | `className`
`protected java.lang.String` | `customSchemaLocation`
`protected java.lang.String` | `elementFormDefault`
`protected java.util.ArrayList<java.lang.String>` | `excludeMethods`
`protected java.util.ArrayList<java.lang.String>` | `extraClasses`
`protected boolean` | `generateBaseException`
`protected boolean` | `isGenerateWrappedArrayTypes`
`protected java.lang.String` | `mappingFileLocation`
`protected java.lang.reflect.Method[]` | `methods`
`protected MethodTable` | `methodTable`
`static java.lang.String` | `NAME_SPACE_PREFIX`
`protected java.util.ArrayList<java.lang.String>` | `nonRpcMethods`
`protected NamespaceGenerator` | `nsGen`
`protected java.util.Map<java.lang.String,java.lang.String>` | `pkg2nsmap`
`protected java.lang.String` | `schema_namespace_prefix`
`protected java.util.Map<java.lang.String,org.apache.ws.commons.schema.XmlSchema>` | `schemaMap`
`protected java.lang.String` | `schemaTargetNameSpace`
`protected AxisService` | `service`
`protected java.lang.Class<?>` | `serviceClass`
`protected boolean` | `sortAttributes`
`protected java.lang.String` | `targetNamespace`
`protected java.util.Map<java.lang.String,java.lang.String>` | `targetNamespacePrefixMap`
`protected TypeTable` | `typeTable`
`protected boolean` | `useWSDLTypesNamespace`
`protected org.apache.ws.commons.schema.XmlSchemaCollection` | `xmlSchemaCollection`

Fields inherited from interface org.apache.axis2.description.java2wsdl.Java2WSDLConstants
`ATTR_FORM_DEFAULT_OPTION, ATTR_FORM_DEFAULT_OPTION_LONG, ATTRIBUTE_NAME, AXIS2_NAMESPACE_PREFIX, AXIS2_XSD, BINDING_LOCAL_NAME, BINDING_NAME_SUFFIX, CLASSNAME_OPTION, CLASSNAME_OPTION_LONG, CLASSPATH_OPTION, CLASSPATH_OPTION_LONG, COLON_SEPARATOR, CUSTOM_SCHEMA_LOCATION, CUSTOM_SCHEMA_LOCATION_LONG, DEFAULT_LOCATION_URL, DEFAULT_SCHEMA_NAMESPACE_PREFIX, DEFAULT_TARGET_NAMESPACE, DEFAULT_TARGET_NAMESPACE_PREFIX, DEFAULT_WSDL_NAMESPACE_PREFIX, DISABLE_BINDING_REST, DISABLE_BINDING_SOAP11, DISABLE_BINDING_SOAP12, DISALLOW_ANON_TYPES_OPTION, DISALLOW_ANON_TYPES_OPTION_LONG, DISALLOW_NILLABLE_ELEMENTS_OPTION, DISALLOW_NILLABLE_ELEMENTS_OPTION_LONG, DOC_LIT_BARE, DOC_LIT_BARE_LONG, DOC_LIT_BARE_PARAMETER, DOCUMENT, ELEMENT_ATTRIBUTE_NAME, ELEMENT_FORM_DEFAULT_OPTION, ELEMENT_FORM_DEFAULT_OPTION_LONG, EXTRA_CLASSES_DEFAULT_OPTION, EXTRA_CLASSES_DEFAULT_OPTION_LONG, FAULT_LOCAL_NAME, FAULT_MESSAGE, FORM_DEFAULT_QUALIFIED, FORM_DEFAULT_UNQUALIFIED, HTTP_BINDING, HTTP_NAMESPACE, HTTP_PORT, HTTP_PREFIX, IN_PUT_LOCAL_NAME, JAVA_PKG_2_NSMAP_OPTION, JAVA_PKG_2_NSMAP_OPTION_LONG, LITERAL, LOCATION, LOCATION_OPTION, LOCATION_OPTION_LONG, MESSAGE_LOCAL_NAME, MESSAGE_PART_NAME_OPTION, MESSAGE_PART_NAME_OPTION_LONG, MESSAGE_SUFFIX, MIME_NAMESPACE, MIME_PREFIX, NAMESPACE_GENERATOR_OPTION, NAMESPACE_GENERATOR_OPTION_LONG, OPERATION_LOCAL_NAME, OUT_PUT_LOCAL_NAME, OUTPUT_FILENAME_OPTION, OUTPUT_FILENAME_OPTION_LONG, OUTPUT_LOCATION_OPTION, OUTPUT_LOCATION_OPTION_LONG, PARAMETERS, PART_ATTRIBUTE_NAME, PORT, PORT_NAME_SUFFIX, PORT_TYPE_LOCAL_NAME, PORT_TYPE_NAME_OPTION, PORT_TYPE_NAME_OPTION_LONG, PORT_TYPE_SUFFIX, REQUEST, REQUEST_ELEMENT_SUFFIX_OPTION, REQUEST_ELEMENT_SUFFIX_OPTION_LONG, REQUEST_MESSAGE, RESPONSE, RESPONSE_MESSAGE, REST_BINDING_NAME_OPTION_LONG, RESULT, SCHEMA_GENERATOR_OPTION, SCHEMA_GENERATOR_OPTION_LONG, SCHEMA_MAPPING_FILE_LOCATION, SCHEMA_MAPPING_FILE_LOCATION_LONG, SCHEMA_NAMESPACE_PRFIX, SCHEMA_TARGET_NAMESPACE_OPTION, SCHEMA_TARGET_NAMESPACE_OPTION_LONG, SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION, SCHEMA_TARGET_NAMESPACE_PREFIX_OPTION_LONG, SERVICE_LOCAL_NAME, SERVICE_NAME_OPTION, SERVICE_NAME_OPTION_LONG, SOAP_ACTION, SOAP_ADDRESS, SOAP_BODY, SOAP_USE, SOAP11_BINDING_NAME_OPTION_LONG, SOAP11_PREFIX, SOAP11PORT, SOAP12_BINDING_NAME_OPTION_LONG, SOAP12_PREFIX, SOAP12BINDING_NAME_SUFFIX, SOAP12PORT, SOLE_INPUT, STYLE, STYLE_OPTION, STYLE_OPTION_LONG, TARGET_NAMESPACE_OPTION, TARGET_NAMESPACE_OPTION_LONG, TARGET_NAMESPACE_PREFIX_OPTION, TARGET_NAMESPACE_PREFIX_OPTION_LONG, TARGETNAMESPACE_PREFIX, TRANSPORT, TRANSPORT_URI, URI_2001_SCHEMA_XSD, URI_WSDL11_SOAP, URI_WSDL12_SOAP, URN_PREFIX, USE_OPTION, USE_OPTION_LONG, WSAD_NS, WSDL_NAMESPACE, WSDL_VERSION_1, WSDL_VERSION_2, WSDL_VERSION_2_OPTIONAL, WSDL_VERSION_OPTION, WSDL_VERSION_OPTION_LONG`

Constructor Summary
`DefaultSchemaGenerator(java.lang.ClassLoader loader, java.lang.String className, java.lang.String schematargetNamespace, java.lang.String schematargetNamespacePrefix, AxisService service)`

Method Summary
`protected void` | `addContentToMethodSchemaType(org.apache.ws.commons.schema.XmlSchemaSequence sequence, javax.xml.namespace.QName schemaTypeName, java.lang.String paraName, boolean isArray)`
`protected void` | `addImport(org.apache.ws.commons.schema.XmlSchema xmlSchema, javax.xml.namespace.QName schemaTypeName)`
`protected java.lang.String` | `generatePrefix()`
`java.util.Collection<org.apache.ws.commons.schema.XmlSchema>` | `generateSchema()` Generates schema for all the parameters in method.
`protected javax.xml.namespace.QName` | `generateSchema(java.lang.Class<?> javaType)` Generate schema construct for given type
`protected void` | `generateSchemaforFieldsandProperties(org.apache.ws.commons.schema.XmlSchema xmlSchema, org.apache.ws.commons.schema.XmlSchemaSequence sequence, java.lang.Class<?> type, java.lang.String name, boolean isArrayType)`
`protected void` | `generateSchemaforGenericFields(org.apache.ws.commons.schema.XmlSchema xmlSchema, org.apache.ws.commons.schema.XmlSchemaSequence sequence, java.lang.reflect.Type genericType, java.lang.String name)`
`java.lang.String` | `getAttrFormDefault()`
`protected org.apache.ws.commons.schema.XmlSchemaForm` | `getAttrFormDefaultSetting()`
`protected java.lang.String` | `getClassName(java.lang.Class<?> type)`
`protected org.apache.ws.commons.schema.XmlSchemaComplexType` | `getComplexTypeForElement(org.apache.ws.commons.schema.XmlSchema xmlSchema, javax.xml.namespace.QName name)`
`java.lang.String` | `getCustomSchemaLocation()`
`java.lang.String` | `getElementFormDefault()`
`protected org.apache.ws.commons.schema.XmlSchemaForm` | `getElementFormDefaultSetting()`
`java.util.ArrayList<java.lang.String>` | `getExtraClasses()`
`java.lang.String` | `getMappingFileLocation()`
`java.lang.reflect.Method[]` | `getMethods()`
`NamespaceGenerator` | `getNsGen()`
`protected java.lang.String` | `getParameterName(java.lang.annotation.Annotation[][] parameterAnnotation, int j, java.lang.String[] parameterNames)`
`java.util.Map<java.lang.String,java.lang.String>` | `getPkg2nsmap()`
`protected java.lang.String` | `getQualifiedName(java.lang.Package packagez)`
`java.lang.String` | `getSchemaTargetNameSpace()`
`protected java.lang.String` | `getSimpleClassName(java.lang.Class type)`
`java.lang.String` | `getTargetNamespace()`
`TypeTable` | `getTypeTable()`
`protected org.apache.ws.commons.schema.XmlSchema` | `getXmlSchema(java.lang.String targetNamespace)`
`protected boolean` | `isDataHandler(java.lang.Class<?> clazz)`
`boolean` | `isUseWSDLTypesNamespace()`
`protected void` | `processException(java.lang.reflect.Method jMethod, AxisOperation axisOperation)` This method will generate Schema element for all the excetion types in a given JMethod - No matter what it will generate Schema element for java.lang.Exception so that for other exception which extend java.lang.Excetion can use as the base class type
`protected java.lang.reflect.Method[]` | `processMethods(java.lang.reflect.Method[] declaredMethods)`
`protected java.lang.String` | `resolveSchemaNamespace(java.lang.String packageName)`
`void` | `setAttrFormDefault(java.lang.String attrFormDefault)`
`void` | `setAxisService(AxisService service)`
`void` | `setCustomSchemaLocation(java.lang.String customSchemaLocation)`
`void` | `setElementFormDefault(java.lang.String elementFormDefault)`
`void` | `setExcludeMethods(java.util.ArrayList<java.lang.String> excludeMethods)`
`void` | `setExtraClasses(java.util.ArrayList<java.lang.String> extraClasses)`
`void` | `setMappingFileLocation(java.lang.String mappingFileLocation)`
`void` | `setNonRpcMethods(java.util.ArrayList<java.lang.String> nonRpcMethods)`
`void` | `setNsGen(NamespaceGenerator nsGen)`
`void` | `setPkg2nsmap(java.util.Map<java.lang.String,java.lang.String> pkg2nsmap)`
`void` | `setUseWSDLTypesNamespace(boolean useWSDLTypesNamespace)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME_SPACE_PREFIX

    public static final java.lang.String NAME_SPACE_PREFIX

See Also:
  Constant Field Values

### targetNamespacePrefixMap

    protected java.util.Map<java.lang.String,java.lang.String> targetNamespacePrefixMap

### schemaMap

    protected java.util.Map<java.lang.String,org.apache.ws.commons.schema.XmlSchema> schemaMap

### xmlSchemaCollection

    protected org.apache.ws.commons.schema.XmlSchemaCollection xmlSchemaCollection

### classLoader

    protected java.lang.ClassLoader classLoader

### className

    protected java.lang.String className

### typeTable

    protected TypeTable typeTable

### methods

    protected java.lang.reflect.Method[] methods

### methodTable

    protected MethodTable methodTable

### schemaTargetNameSpace

    protected java.lang.String schemaTargetNameSpace

### schema_namespace_prefix

    protected java.lang.String schema_namespace_prefix

### attrFormDefault

    protected java.lang.String attrFormDefault

### elementFormDefault

    protected java.lang.String elementFormDefault

### excludeMethods

    protected java.util.ArrayList<java.lang.String> excludeMethods

### extraClasses

    protected java.util.ArrayList<java.lang.String> extraClasses

### useWSDLTypesNamespace

    protected boolean useWSDLTypesNamespace

### pkg2nsmap

    protected java.util.Map<java.lang.String,java.lang.String> pkg2nsmap

### nsGen

    protected NamespaceGenerator nsGen

### targetNamespace

    protected java.lang.String targetNamespace

### nonRpcMethods

    protected java.util.ArrayList<java.lang.String> nonRpcMethods

### serviceClass

    protected java.lang.Class<?> serviceClass

### service

    protected AxisService service

### customSchemaLocation

    protected java.lang.String customSchemaLocation

### mappingFileLocation

    protected java.lang.String mappingFileLocation

### generateBaseException

    protected boolean generateBaseException

### sortAttributes

    protected boolean sortAttributes

### isGenerateWrappedArrayTypes

    protected boolean isGenerateWrappedArrayTypes

Constructor Detail

### DefaultSchemaGenerator

    public DefaultSchemaGenerator(java.lang.ClassLoader loader,
                                  java.lang.String className,
                                  java.lang.String schematargetNamespace,
                                  java.lang.String schematargetNamespacePrefix,
                                  AxisService service)
                           throws java.lang.Exception

Throws:
  `java.lang.Exception`

Method Detail

### getNsGen

    public NamespaceGenerator getNsGen()
                                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### setNsGen

    public void setNsGen(NamespaceGenerator nsGen)

  Specified by:
    `setNsGen` in interface `SchemaGenerator`

### generateSchema

    public java.util.Collection<org.apache.ws.commons.schema.XmlSchema> generateSchema()
                                                                                throws java.lang.Exception

  Generates schema for all the parameters in method. First generates schema for all different parameter type and later refers to them.

  Specified by:
    `generateSchema` in interface `SchemaGenerator`
  Returns:
    Returns XmlSchema.
  Throws:
    `java.lang.Exception`

### processMethods

    protected java.lang.reflect.Method[] processMethods(java.lang.reflect.Method[] declaredMethods)
                                                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### processException

    protected void processException(java.lang.reflect.Method jMethod,
                                    AxisOperation axisOperation)
                             throws java.lang.Exception

  This method will generate Schema element for all the excetion types in a given JMethod - No matter what it will generate Schema element for java.lang.Exception so that for other exception which extend java.lang.Excetion can use as the base class type

  Throws:
    `java.lang.Exception`

### generateSchema

    protected javax.xml.namespace.QName generateSchema(java.lang.Class<?> javaType)
                                                throws java.lang.Exception

  Generate schema construct for given type

  Parameters:
    `javaType` - : Class to whcih need to generate Schema
  Returns:
    : Generated QName
  Throws:
    `java.lang.Exception`

### generateSchemaforFieldsandProperties

    protected void generateSchemaforFieldsandProperties(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                                        org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                        java.lang.Class<?> type,
                                                        java.lang.String name,
                                                        boolean isArrayType)
                                                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### generateSchemaforGenericFields

    protected void generateSchemaforGenericFields(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                                  org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                  java.lang.reflect.Type genericType,
                                                  java.lang.String name)
                                           throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### isDataHandler

    protected boolean isDataHandler(java.lang.Class<?> clazz)

### addContentToMethodSchemaType

    protected void addContentToMethodSchemaType(org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                javax.xml.namespace.QName schemaTypeName,
                                                java.lang.String paraName,
                                                boolean isArray)

### getComplexTypeForElement

    protected org.apache.ws.commons.schema.XmlSchemaComplexType getComplexTypeForElement(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                                                                         javax.xml.namespace.QName name)

### getXmlSchema

    protected org.apache.ws.commons.schema.XmlSchema getXmlSchema(java.lang.String targetNamespace)

### getTypeTable

    public TypeTable getTypeTable()

  Specified by:
    `getTypeTable` in interface `SchemaGenerator`

### getMethods

    public java.lang.reflect.Method[] getMethods()

  Specified by:
    `getMethods` in interface `SchemaGenerator`

### generatePrefix

    protected java.lang.String generatePrefix()

### setExcludeMethods

    public void setExcludeMethods(java.util.ArrayList<java.lang.String> excludeMethods)

  Specified by:
    `setExcludeMethods` in interface `SchemaGenerator`

### getSchemaTargetNameSpace

    public java.lang.String getSchemaTargetNameSpace()

  Specified by:
    `getSchemaTargetNameSpace` in interface `SchemaGenerator`

### addImport

    protected void addImport(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                             javax.xml.namespace.QName schemaTypeName)

### getAttrFormDefault

    public java.lang.String getAttrFormDefault()

### setAttrFormDefault

    public void setAttrFormDefault(java.lang.String attrFormDefault)

  Specified by:
    `setAttrFormDefault` in interface `SchemaGenerator`

### getElementFormDefault

    public java.lang.String getElementFormDefault()

### setElementFormDefault

    public void setElementFormDefault(java.lang.String elementFormDefault)

  Specified by:
    `setElementFormDefault` in interface `SchemaGenerator`

### getAttrFormDefaultSetting

    protected org.apache.ws.commons.schema.XmlSchemaForm getAttrFormDefaultSetting()

### getElementFormDefaultSetting

    protected org.apache.ws.commons.schema.XmlSchemaForm getElementFormDefaultSetting()

### getExtraClasses

    public java.util.ArrayList<java.lang.String> getExtraClasses()

### setExtraClasses

    public void setExtraClasses(java.util.ArrayList<java.lang.String> extraClasses)

  Specified by:
    `setExtraClasses` in interface `SchemaGenerator`

### resolveSchemaNamespace

    protected java.lang.String resolveSchemaNamespace(java.lang.String packageName)
                                               throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### isUseWSDLTypesNamespace

    public boolean isUseWSDLTypesNamespace()

### setUseWSDLTypesNamespace

    public void setUseWSDLTypesNamespace(boolean useWSDLTypesNamespace)

  Specified by:
    `setUseWSDLTypesNamespace` in interface `SchemaGenerator`

### getPkg2nsmap

    public java.util.Map<java.lang.String,java.lang.String> getPkg2nsmap()

### setPkg2nsmap

    public void setPkg2nsmap(java.util.Map<java.lang.String,java.lang.String> pkg2nsmap)

  Specified by:
    `setPkg2nsmap` in interface `SchemaGenerator`

### getTargetNamespace

    public java.lang.String getTargetNamespace()

  Specified by:
    `getTargetNamespace` in interface `SchemaGenerator`

### getClassName

    protected java.lang.String getClassName(java.lang.Class<?> type)

### getSimpleClassName

    protected java.lang.String getSimpleClassName(java.lang.Class type)

### getQualifiedName

    protected java.lang.String getQualifiedName(java.lang.Package packagez)

### setNonRpcMethods

    public void setNonRpcMethods(java.util.ArrayList<java.lang.String> nonRpcMethods)

  Specified by:
    `setNonRpcMethods` in interface `SchemaGenerator`

### setAxisService

    public void setAxisService(AxisService service)

  Specified by:
    `setAxisService` in interface `SchemaGenerator`

### getCustomSchemaLocation

    public java.lang.String getCustomSchemaLocation()

  Specified by:
    `getCustomSchemaLocation` in interface `SchemaGenerator`

### setCustomSchemaLocation

    public void setCustomSchemaLocation(java.lang.String customSchemaLocation)

  Specified by:
    `setCustomSchemaLocation` in interface `SchemaGenerator`

### getMappingFileLocation

    public java.lang.String getMappingFileLocation()

  Specified by:
    `getMappingFileLocation` in interface `SchemaGenerator`

### setMappingFileLocation

    public void setMappingFileLocation(java.lang.String mappingFileLocation)

  Specified by:
    `setMappingFileLocation` in interface `SchemaGenerator`

### getParameterName

    protected java.lang.String getParameterName(java.lang.annotation.Annotation[][] parameterAnnotation,
                                                int j,
                                                java.lang.String[] parameterNames)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.