Class DefaultSchemaGenerator

    • Field Detail

      • targetNamespacePrefixMap

        protected Map<String,​String> targetNamespacePrefixMap
      • schemaMap

        protected Map<String,​org.apache.ws.commons.schema.XmlSchema> schemaMap
      • xmlSchemaCollection

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

        protected String className
      • methods

        protected Method[] methods
      • schemaTargetNameSpace

        protected String schemaTargetNameSpace
      • schema_namespace_prefix

        protected String schema_namespace_prefix
      • attrFormDefault

        protected String attrFormDefault
      • elementFormDefault

        protected String elementFormDefault
      • excludeMethods

        protected List<String> excludeMethods
      • extraClasses

        protected List<String> extraClasses
      • useWSDLTypesNamespace

        protected boolean useWSDLTypesNamespace
      • targetNamespace

        protected String targetNamespace
      • nonRpcMethods

        protected List<String> nonRpcMethods
      • serviceClass

        protected Class<?> serviceClass
      • customSchemaLocation

        protected String customSchemaLocation
      • mappingFileLocation

        protected String mappingFileLocation
      • generateBaseException

        protected boolean generateBaseException
      • sortAttributes

        protected boolean sortAttributes
      • isGenerateWrappedArrayTypes

        protected boolean isGenerateWrappedArrayTypes
    • Method Detail

      • generateSchema

        public Collection<org.apache.ws.commons.schema.XmlSchema> generateSchema()
                                                                          throws 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:
        Exception
      • processException

        protected void processException​(Method jMethod,
                                        AxisOperation axisOperation)
                                 throws 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:
        Exception
      • generateSchema

        protected QName generateSchema​(Class<?> javaType)
                                throws Exception
        Generate schema construct for given type
        Parameters:
        javaType - : Class to whcih need to generate Schema
        Returns:
        : Generated QName
        Throws:
        Exception
      • generateSchemaforFieldsandProperties

        protected void generateSchemaforFieldsandProperties​(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                                            org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                            Class<?> type,
                                                            String name,
                                                            boolean isArrayType)
                                                     throws Exception
        Throws:
        Exception
      • generateSchemaforGenericFields

        protected void generateSchemaforGenericFields​(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                                      org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                      Type genericType,
                                                      String name)
                                               throws Exception
        Throws:
        Exception
      • isDataHandler

        protected boolean isDataHandler​(Class<?> clazz)
      • addContentToMethodSchemaType

        protected void addContentToMethodSchemaType​(org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                    QName schemaTypeName,
                                                    String paraName,
                                                    boolean isArray)
      • getComplexTypeForElement

        protected org.apache.ws.commons.schema.XmlSchemaComplexType getComplexTypeForElement​(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                                                                             QName name)
      • getXmlSchema

        protected org.apache.ws.commons.schema.XmlSchema getXmlSchema​(String targetNamespace)
      • generatePrefix

        protected String generatePrefix()
      • addImport

        protected void addImport​(org.apache.ws.commons.schema.XmlSchema xmlSchema,
                                 QName schemaTypeName)
      • getAttrFormDefault

        public String getAttrFormDefault()
      • getElementFormDefault

        public String getElementFormDefault()
      • getAttrFormDefaultSetting

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

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

        public List<String> getExtraClasses()
      • isUseWSDLTypesNamespace

        public boolean isUseWSDLTypesNamespace()
      • getClassName

        protected String getClassName​(Class<?> type)
      • getSimpleClassName

        protected String getSimpleClassName​(Class type)
      • getQualifiedName

        protected String getQualifiedName​(Package packagez)
      • getParameterName

        protected String getParameterName​(Annotation[][] parameterAnnotation,
                                          int j,
                                          String[] parameterNames)
      • generateSchemaTypeForMap

        protected QName generateSchemaTypeForMap​(org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                 Type genericParameterType,
                                                 String parameterName,
                                                 boolean isArrayType)
                                          throws Exception
        Generate schema type for map.
        Parameters:
        sequence - the sequence
        genericParameterType - the generic parameter type
        parameterName - the parameter name
        Returns:
        the q name
        Throws:
        Exception - the exception
      • generateSchemaTypeForMapParameter

        protected void generateSchemaTypeForMapParameter​(org.apache.ws.commons.schema.XmlSchemaSequence entrySequence,
                                                         Type parameterType,
                                                         String elementName)
                                                  throws Exception
        Generate schema type for map parameter.
        Parameters:
        entrySequence - the entry sequence
        parameterType - the parameter type
        elementName - the element name
        Throws:
        Exception - the exception
      • generateSchemaForCollection

        protected QName generateSchemaForCollection​(org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                    Type genericType,
                                                    String partName)
                                             throws Exception
        Generate schema for collection.
        Parameters:
        sequence - the sequence
        genericType - the generic type
        partName - the part name
        Returns:
        the q name
        Throws:
        Exception - the exception
      • generateSchemaTypeForDocument

        protected QName generateSchemaTypeForDocument​(org.apache.ws.commons.schema.XmlSchemaSequence sequence,
                                                      String parameterName)
        Generate schema type for document.
        Parameters:
        sequence - the sequence
        parameterName - the parameter name