org.apache.axis2.jaxbri
Class JaxbSchemaGenerator

java.lang.Object
  extended by org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator
      extended by org.apache.axis2.jaxbri.JaxbSchemaGenerator
All Implemented Interfaces:
Java2WSDLConstants, SchemaGenerator

public class JaxbSchemaGenerator
extends DefaultSchemaGenerator


Field Summary
 
Fields inherited from class org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator
attrFormDefault, classLoader, className, customSchemaLocation, elementFormDefault, excludeMethods, extraClasses, generateBaseException, mappingFileLocation, methods, methodTable, NAME_SPACE_PREFIX, nonRpcMethods, nsGen, pkg2nsmap, schema_namespace_prefix, schemaMap, schemaTargetNameSpace, service, serviceClass, targetNamespace, targetNamespacePrefixMap, typeTable, useWSDLTypesNamespace, 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, 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_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_SUFFIX, REQUEST, REQUEST_MESSAGE, RESPONSE, RESPONSE_MESSAGE, 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_PREFIX, SOAP11PORT, 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
JaxbSchemaGenerator(java.lang.ClassLoader loader, java.lang.String className, java.lang.String schematargetNamespace, java.lang.String schematargetNamespacePrefix)
           
 
Method Summary
protected static javax.xml.bind.JAXBContext createJAXBContext(java.util.Set<java.lang.Class<?>> classes, java.lang.String defaultNs)
           
protected  java.util.List<javax.xml.transform.dom.DOMResult> generateJaxbSchemas(javax.xml.bind.JAXBContext context)
           
 java.util.Collection generateSchema()
          Generates schema for all the parameters in method.
 void generateSchemaForParameters()
          collects all the method parameters and the extra classes from the command line creates a JAXBContext and generates schemas from the JAXBContext
protected  java.util.List<java.lang.Class<?>> processMethods(java.lang.reflect.Method[] declaredMethods)
           
 
Methods inherited from class org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator
addContentToMethodSchemaType, addImport, generatePrefix, generateSchemaforFieldsandProperties, getActualQualifiedName, getAttrFormDefault, getAttrFormDefaultSetting, getComplexTypeForElement, getCorrectName, getCustomSchemaLocation, getElementFormDefault, getElementFormDefaultSetting, getExtraClasses, getMappingFileLocation, getMethods, getNsGen, getPkg2nsmap, getQualifiedName, getQualifiedName, getQualifiedName, getQualifiedName, getQualifiedName, getSchemaTargetNameSpace, getSimpleName, getSimpleName, getSimpleName, getSimpleName, getTargetNamespace, getTypeTable, getXmlSchema, isDataHandler, isUseWSDLTypesNamespace, processException, processMethods, resolveSchemaNamespace, setAttrFormDefault, setAxisService, setCustomSchemaLocation, setElementFormDefault, setExcludeMethods, setExtraClasses, setMappingFileLocation, setNonRpcMethods, setNsGen, setPkg2nsmap, setUseWSDLTypesNamespace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbSchemaGenerator

public JaxbSchemaGenerator(java.lang.ClassLoader loader,
                           java.lang.String className,
                           java.lang.String schematargetNamespace,
                           java.lang.String schematargetNamespacePrefix)
                    throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

generateSchema

public java.util.Collection generateSchema()
                                    throws java.lang.Exception
Description copied from class: DefaultSchemaGenerator
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
Overrides:
generateSchema in class DefaultSchemaGenerator
Returns:
Returns XmlSchema.
Throws:
java.lang.Exception

generateSchemaForParameters

public void generateSchemaForParameters()
                                 throws java.lang.Exception
collects all the method parameters and the extra classes from the command line creates a JAXBContext and generates schemas from the JAXBContext

Throws:
java.lang.Exception

processMethods

protected java.util.List<java.lang.Class<?>> processMethods(java.lang.reflect.Method[] declaredMethods)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

generateJaxbSchemas

protected java.util.List<javax.xml.transform.dom.DOMResult> generateJaxbSchemas(javax.xml.bind.JAXBContext context)
                                                                         throws java.io.IOException
Throws:
java.io.IOException

createJAXBContext

protected static javax.xml.bind.JAXBContext createJAXBContext(java.util.Set<java.lang.Class<?>> classes,
                                                              java.lang.String defaultNs)
                                                       throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.