Class AxisServiceBasedMultiLanguageEmitter

    • Field Detail

      • mepToClassMap

        protected static final Map mepToClassMap
      • mepToSuffixMap

        protected static final Map mepToSuffixMap
      • uniqueFaultNameCounter

        protected int uniqueFaultNameCounter
      • constructorMap

        protected static final HashMap constructorMap
        Field constructorMap
      • log

        protected static final org.apache.commons.logging.Log log
      • infoHolder

        protected Map infoHolder
      • allServiceInfoHolder

        protected Map allServiceInfoHolder
      • axisServices

        protected List axisServices
      • fullyQualifiedFaultClassNameMap

        protected Map fullyQualifiedFaultClassNameMap
      • faultClassNameMap

        protected Map faultClassNameMap
      • faultElementQNameMap

        protected Map faultElementQNameMap
      • instantiatableMessageClassNames

        protected Map instantiatableMessageClassNames
      • useHolderClass_jaxws

        protected boolean useHolderClass_jaxws
      • wrapped_jaxws

        protected boolean wrapped_jaxws
    • Constructor Detail

      • AxisServiceBasedMultiLanguageEmitter

        public AxisServiceBasedMultiLanguageEmitter()
        default constructor - builds
    • Method Detail

      • getBindingPropertyFromOperation

        protected Object getBindingPropertyFromOperation​(String name,
                                                         QName qName)
      • getBindingPolicyFromMessage

        protected org.apache.neethi.Policy getBindingPolicyFromMessage​(AxisBindingOperation axisBindingOperation,
                                                                       String key)
      • getBindingPropertyFromMessage

        protected Object getBindingPropertyFromMessage​(String name,
                                                       QName qName,
                                                       String key)
      • getBindingPropertyFromMessageFault

        protected Object getBindingPropertyFromMessageFault​(String name,
                                                            QName qName,
                                                            String key)
      • updateMapperForStub

        protected void updateMapperForStub()
        Update mapper for the stub
      • getFullyQualifiedStubName

        protected String getFullyQualifiedStubName()
        Returns the fully qualified Stub name reused in many methods
        Returns:
        classname
      • resetFaultNames

        protected void resetFaultNames()
        rests the fault name maps
      • generateAndPopulateFaultNames

        protected void generateAndPopulateFaultNames()
        Populate a map of fault class names
      • getNewCopy

        public Map getNewCopy​(Map copyFormMap)
      • copyMap

        public void copyMap​(Map copyFormMap,
                            Map copyToMap)
      • writeAntBuild

        protected void writeAntBuild()
                              throws Exception
        Writes the Ant build.
        Throws:
        Exception
      • createDOMDocumentForAntBuild

        protected Document createDOMDocumentForAntBuild()
        Creates the DOM tree for the Ant build. Uses the interface.
      • writeTestClasses

        protected void writeTestClasses()
                                 throws Exception
        Write the test classes
        Throws:
        Exception
      • createDOMDocumentForTestCase

        protected Document createDOMDocumentForTestCase()
        Creates the XML Model for the test case
        Returns:
        DOM document
      • writeInterfaceImplementation

        protected void writeInterfaceImplementation()
                                             throws Exception
        Writes the implementations.
        Throws:
        Exception
      • createDOMDocumentForInterfaceImplementation

        protected Document createDOMDocumentForInterfaceImplementation()
                                                                throws Exception
        Creates the DOM tree for implementations.
        Throws:
        Exception
      • getUniqueListofFaults

        protected Element getUniqueListofFaults​(Document doc)
        A util method that returns a unique list of faults
        Parameters:
        doc -
        Returns:
        DOM element
      • addFaultMessages

        protected void addFaultMessages​(List operationFaultMessages,
                                        Set faultMessagesToMep)
        add the qNames of the operation fault message names to faultMessages Mep
        Parameters:
        operationFaultMessages -
        faultMessagesToMep -
      • getUniqueListofFaultsofMep

        protected Element getUniqueListofFaultsofMep​(Document doc,
                                                     String mep)
        A util method that returns a unique list of faults for a given mep
        Parameters:
        doc -
        Returns:
        DOM element
      • addEndpoint

        protected void addEndpoint​(Document doc,
                                   Element rootElement)
                            throws Exception
        Adds the endpoint to the document.
        Parameters:
        doc -
        rootElement -
        Throws:
        Exception
      • addSoapVersion

        protected void addSoapVersion​(Document doc,
                                      Element rootElement)
        Looks for the SOAPVersion and adds it.
        Parameters:
        doc -
        rootElement -
      • writeExceptions

        protected void writeExceptions()
                                throws Exception
        Writes the exceptions.
        Throws:
        Exception
      • createDOMDocumentForException

        protected Document createDOMDocumentForException()
        Generates the model for the callbacks.
      • writeCallBackHandlers

        protected void writeCallBackHandlers()
                                      throws Exception
        Writes the callback handlers.
        Throws:
        Exception
      • createDOMDocumentForCallbackHandler

        protected Document createDOMDocumentForCallbackHandler()
        Generates the model for the callbacks.
      • writeInterface

        protected void writeInterface​(boolean writeDatabinders)
                               throws Exception
        Writes the interfaces.
        Throws:
        Exception
      • createDOMDocumentForInterface

        protected Document createDOMDocumentForInterface​(boolean writeDatabinders)
        Creates the DOM tree for the interface creation. Uses the interface.
      • updateMapperForMessageReceiver

        protected void updateMapperForMessageReceiver()
        Update mapper for message receiver
      • getFullyQualifiedMessageReceiverName

        protected String getFullyQualifiedMessageReceiverName()
        Returns:
        fully qualified MR name
      • getFullyQualifiedSkeletonName

        protected String getFullyQualifiedSkeletonName()
        Returns:
        fully qualified skeleton name
      • getFullyQualifiedSkeletonInterfaceName

        protected String getFullyQualifiedSkeletonInterfaceName()
        Returns:
        fully qualified skeleton interface name
      • writeWSDLFiles

        protected void writeWSDLFiles()
        Write out the WSDL files (and the schemas) writing the WSDL (and schemas) is somewhat special so we cannot follow the usual pattern of using the class writer
      • copyToFaultMap

        protected void copyToFaultMap()
        Utility method to copy the faults to the correct map
      • updateFaultPackageForStub

        protected void updateFaultPackageForStub()
        Change the fault classnames to go with the package and stub
      • writeMessageReceiver

        protected void writeMessageReceiver()
                                     throws Exception
        Writes the message receiver
        Throws:
        Exception
      • createDocumentForMessageReceiver

        protected Document createDocumentForMessageReceiver​(String mep,
                                                            boolean isServerSideInterface)
        Creates the XML model for the message receiver
        Parameters:
        mep -
        isServerSideInterface -
        Returns:
        DOM Document
      • createDOMElementforDatabinders

        protected Element createDOMElementforDatabinders​(Document doc,
                                                         boolean isServerside)
        create a dom element for databinders. This is called by other
        Parameters:
        doc -
      • addShortType

        protected void addShortType​(Element paramElement,
                                    String xmlName)
        set the short type as it is in the data binding
        Parameters:
        paramElement -
        xmlName -
      • getOpNames

        protected Element getOpNames​(Document doc)
        Gets an element representing the operation names
        Parameters:
        doc -
        Returns:
        Returns Element.
      • getBase64Elements

        protected Element getBase64Elements​(Document doc)
        Gets the base64 types. If not available this will be empty!!!
        Parameters:
        doc -
        Returns:
        Returns Element.
      • processModelObjects

        protected void processModelObjects​(Map objectMappings,
                                           Element root,
                                           Document doc)
        Parameters:
        objectMappings -
        root -
        doc -
      • updateMapperClassnames

        protected void updateMapperClassnames​(String fullyQulifiedIncludingClassNamePrefix)
        we need to modify the mapper's class name list. The issue here is that in this case we do not expect the fully qulified class names to be present in the class names list due to the simple reason that they've not been written yet! Hence the mappers class name list needs to be updated to suit the expected package to be written in this case we modify the package name to have the class a inner class of the stub, interface or the message receiver depending on the style
      • writeServiceXml

        protected void writeServiceXml()
                                throws Exception
        Write the service XML
        Throws:
        Exception
      • createDOMDocumentForServiceXML

        protected Document createDOMDocumentForServiceXML()
      • getServiceElement

        protected Element getServiceElement​(String serviceName,
                                            String className,
                                            Document doc)
        A resusable method to return the service element for creating the service xml
        Parameters:
        serviceName -
        className -
        doc -
        Returns:
        DOM Element
      • writeSkeletonInterface

        protected void writeSkeletonInterface()
                                       throws Exception
        Write the skeletonInterface
        Throws:
        Exception
      • createDOMDocumentForSkeleton

        protected Document createDOMDocumentForSkeleton​(boolean isSkeletonInterface)
        Creates the XMLModel for the skeleton
        Parameters:
        isSkeletonInterface -
        Returns:
        DOM Document
      • createDOMDocumentForSkeletonInterface

        protected Document createDOMDocumentForSkeletonInterface()
        Creates the XML model for the skeleton interface
        Returns:
        DOM Document
      • loadOperations

        protected boolean loadOperations​(Document doc,
                                         Element rootElement,
                                         String mep)
        Loads the operations
        Parameters:
        doc -
        rootElement -
        mep -
        Returns:
        boolean
      • getEmptyDocument

        protected Document getEmptyDocument()
      • makeJavaClassName

        protected String makeJavaClassName​(String word)
        Parameters:
        word -
        Returns:
        Returns character removed string.
      • addAttribute

        protected void addAttribute​(Document document,
                                    String AttribName,
                                    String attribValue,
                                    Element element)
        Utility method to add an attribute to a given element.
        Parameters:
        document -
        AttribName -
        attribValue -
        element -
      • fillSyncAttributes

        protected void fillSyncAttributes​(Document doc,
                                          Element rootElement)
        Parameters:
        doc -
        rootElement -
      • debugLogDocument

        protected void debugLogDocument​(String description,
                                        Document doc)
        debugging method - write the output to the debugger
        Parameters:
        description -
        doc -
      • getOutputDirectory

        protected File getOutputDirectory​(File outputDir,
                                          String dir2)
        Gets the output directory for source files.
        Parameters:
        outputDir -
        Returns:
        Returns File.
      • addSOAPAction

        protected void addSOAPAction​(Document doc,
                                     Element rootElement,
                                     QName qName)
        Adds the soap action
        Parameters:
        doc -
        rootElement -
        qName -
      • addHeaderOperations

        protected void addHeaderOperations​(List soapHeaderParameterQNameList,
                                           AxisBindingOperation bindingOperation,
                                           boolean input)
        populate the header parameters
        Parameters:
        soapHeaderParameterQNameList -
        bindingOperation -
        input -
      • addHeaderOperationsToFault

        protected void addHeaderOperationsToFault​(List soapHeaderParameterQNameList,
                                                  AxisOperation axisOperation)
        populate the header parameters to faults
        Parameters:
        soapHeaderParameterQNameList -
        axisOperation -
      • getInputElement

        protected Element getInputElement​(Document doc,
                                          AxisBindingOperation bindingOperation,
                                          List headerParameterQNameList)
        Get the input element
        Parameters:
        doc -
        bindingOperation -
        headerParameterQNameList -
        Returns:
        DOM element
      • getFaultElement

        protected Element getFaultElement​(Document doc,
                                          AxisOperation operation)
        Get the fault element - No header faults are supported
        Parameters:
        doc -
        operation -
      • getOutputElement

        protected Element getOutputElement​(Document doc,
                                           AxisBindingOperation bindingOperation,
                                           List headerParameterQNameList)
        Finds the output element.
        Parameters:
        doc -
        bindingOperation -
        headerParameterQNameList -
      • getFaultParamElements

        protected Element[] getFaultParamElements​(Document doc,
                                                  AxisOperation operation)
        Parameters:
        doc -
        operation -
        Returns:
        Returns the parameter element.
      • getInputParamElement

        protected Element[] getInputParamElement​(Document doc,
                                                 AxisOperation operation)
        Parameters:
        doc -
        operation -
        Returns:
        Returns the parameter element.
      • generateParamComponent

        protected Element generateParamComponent​(Document doc,
                                                 String comment,
                                                 String paramName,
                                                 String paramType,
                                                 QName operationName,
                                                 QName paramQName)
        A convenient method for the generating the parameter element
        Parameters:
        doc -
        paramName -
        paramType -
        Returns:
        DOM Element
      • generateParamComponent

        protected Element generateParamComponent​(Document doc,
                                                 String comment,
                                                 String paramName,
                                                 String paramType,
                                                 QName paramQName)
        A convenient method for the generating the parameter element
        Parameters:
        doc -
        paramName -
        paramType -
        Returns:
        DOM Element
      • generateOptionParamComponent

        protected Element generateOptionParamComponent​(Document doc,
                                                       String name,
                                                       String value)
        A convenient method for the generating optionParam components
        Parameters:
        doc -
        name -
        value -
        Returns:
        Element
      • generateParamComponent

        protected Element generateParamComponent​(Document doc,
                                                 String comment,
                                                 String paramName,
                                                 String paramType,
                                                 QName opName,
                                                 QName paramQName,
                                                 String partName,
                                                 boolean isPrimitive,
                                                 boolean isArray)
        A convenient method for the generating the parameter element
        Parameters:
        doc -
        paramName -
        paramType -
        opName -
        paramName -
      • getOutputParamElement

        protected Element getOutputParamElement​(Document doc,
                                                AxisOperation operation)
        Parameters:
        doc -
        operation -
        Returns:
        Returns Element.
      • getParamInitializer

        protected String getParamInitializer​(String paramType)
        Parameters:
        paramType -
      • getParameterElementList

        protected List getParameterElementList​(Document doc,
                                               List parameters,
                                               String location)
        Parameters:
        doc -
        parameters -
        location -
      • getParameterElementListForHttpHeader

        protected List getParameterElementListForHttpHeader​(Document doc,
                                                            List parameters,
                                                            String location)
      • getParameterElementListForSOAPModules

        protected List getParameterElementListForSOAPModules​(Document doc,
                                                             List parameters)
      • addElement

        protected Element addElement​(Document document,
                                     String eltName,
                                     String eltValue,
                                     Element element)
        Utility method to add an attribute to a given element.
        Parameters:
        document -
        eltName -
        eltValue -
        element -