Class WSDLModelerBase

java.lang.Object
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase
All Implemented Interfaces:
Modeler
Direct Known Subclasses:
WSDLModeler101, WSDLModeler103, WSDLModeler11, WSDLModeler111, WSDLModeler112

public abstract class WSDLModelerBase extends Object implements Modeler
Author:
JAX-RPC Development Team Base class for WSDL->Model classes.
  • Field Details

  • Constructor Details

  • Method Details

    • buildModel

      public Model buildModel()
      Builds model from WSDL document. Model contains abstraction which is used by the generators to generate the stub/tie/serializers etc. code.
      Specified by:
      buildModel in interface Modeler
      Returns:
      Model - the root Node of the model of the Web Service
      See Also:
    • getSchemaAnalyzerInstance

      protected abstract SchemaAnalyzerBase getSchemaAnalyzerInstance(WSDLDocument document, WSDLModelInfo _modelInfo, Properties _options, Set _conflictingClassNames, JavaSimpleTypeCreator _javaTypes)
      Gets the appropriate Schema Analyzer for the wsdl
      Parameters:
      document -
      _modelInfo -
      _options -
      _conflictingClassNames -
      _javaTypes -
      Returns:
      the schema analyzer
    • getSchemaAnalyzer

      protected SchemaAnalyzerBase getSchemaAnalyzer()
    • processSearchSchemaOption

      protected void processSearchSchemaOption(WSDLDocument document, Model model)
      Should be called for -f:searchschema option processing. With this option we look for all the schema types under <wsdl:types> ..</wsdl:types>.
      Parameters:
      document - WSDL document
      model - Model which will be used by the generators to generate code.
    • getDocumentationFor

      protected Documentation getDocumentationFor(Element e)
    • checkNotWsdlElement

      protected void checkNotWsdlElement(Element e)
    • checkNotWsdlRequired

      protected void checkNotWsdlRequired(Element e)
    • getServiceInterfaceName

      protected String getServiceInterfaceName(QName serviceQName, Service wsdlService)
      Parameters:
      serviceQName -
      wsdlService -
      Returns:
      The full name of the class for the wsdl service
    • processService

      protected void processService(Service wsdlService, Model model, WSDLDocument document)
      Parameters:
      wsdlService -
      model -
      document -
    • getJavaNameOfPort

      protected String getJavaNameOfPort(QName portQName)
    • processPort

      protected boolean processPort(Port wsdlPort, Service service, WSDLDocument document)
      Parameters:
      wsdlPort -
      service -
      document -
      Returns:
      boolean
    • setCurrentPort

      protected void setCurrentPort(Port port)
    • processSOAPOperation

      protected Operation processSOAPOperation()
    • postProcessSOAPOperation

      protected void postProcessSOAPOperation(Operation operation)
    • setJavaOperationNameProperty

      protected void setJavaOperationNameProperty(Message inputMessage)
    • useExplicitServiceContextForRpcEncoded

      protected boolean useExplicitServiceContextForRpcEncoded(Message inputMessage)
    • useExplicitServiceContextForRpcLit

      protected boolean useExplicitServiceContextForRpcLit(Message inputMessage)
    • useExplicitServiceContextForDocLit

      protected boolean useExplicitServiceContextForDocLit(Message inputMessage)
    • processSOAPOperationRPCEncodedStyle

      protected Operation processSOAPOperationRPCEncodedStyle()
    • verifyResultType

      protected AbstractType verifyResultType(AbstractType type, Operation operation)
    • verifyParameterType

      protected AbstractType verifyParameterType(AbstractType type, String partName, Operation operation)
    • createParentFault

      protected void createParentFault(Fault fault)
    • createSubfaults

      protected void createSubfaults(Fault fault)
    • getSOAPRequestBody

      protected SOAPBody getSOAPRequestBody()
    • isRequestMimeMultipart

      protected boolean isRequestMimeMultipart()
    • isResponseMimeMultipart

      protected boolean isResponseMimeMultipart()
    • getSOAPResponseBody

      protected SOAPBody getSOAPResponseBody()
    • getOutputMessage

      protected Message getOutputMessage()
    • getInputMessage

      protected Message getInputMessage()
    • setSOAPUse

      protected void setSOAPUse()
    • getMessageParts

      protected List getMessageParts(SOAPBody body, Message message, boolean isInput)
      Parameters:
      body - request or response body, represents soap:body
      message - Input or output message, equivalent to wsdl:message
      Returns:
      iterator over MessagePart
    • processParameterOrder

      protected List processParameterOrder(Set inputParameterNames, Set outputParameterNames, StringBuffer resultParameterName)
    • isSingleInOutPart

      protected boolean isSingleInOutPart(Set inputParameterNames, MessagePart outputPart)
      Returns true when there is single inout part and no parameterOrder defined. This fixes bug: 4922107. This method should be overriden for 1.1 or previous version to 1.1.1 as this fix results in the generated method signature change.
      Returns:
      true if there is single inout part
    • isOperationDocumentLiteral

      protected boolean isOperationDocumentLiteral()
    • isStyleAndPartMatch

      protected boolean isStyleAndPartMatch(SOAPOperation soapOperation, MessagePart part)
      For Document/Lit the wsdl:part should only have element attribute and for RPC/Lit or RPC/Encoded the wsdl:part should only have type attribute inside wsdl:message. Nagesh: Made the above rule applicable for only wsi compliant WSDLs.
    • getRequestNamespaceURI

      protected String getRequestNamespaceURI(SOAPBody body)
    • getResponseNamespaceURI

      protected String getResponseNamespaceURI(SOAPBody body)
    • getStructureNamePrefix

      protected String getStructureNamePrefix()
    • processSOAPOperationRPCLiteralStyle

      protected Operation processSOAPOperationRPCLiteralStyle()
    • isBoundToMimeContent

      protected boolean isBoundToMimeContent(MessagePart part)
      Parameters:
      part -
      Returns:
      true if the message part is a wsdl mime type
    • isBoundToSOAPBody

      protected boolean isBoundToSOAPBody(MessagePart part)
      Parameters:
      part -
      Returns:
      true if the message part is the soap body
    • handleLiteralSOAPFault

      protected void handleLiteralSOAPFault(Response response, Set duplicateNames)
      Parameters:
      response -
      duplicateNames -
    • getFaultName

      protected String getFaultName(String faultPartName, String soapFaultName, String bindFaultName, String faultMessageName)
      bug fix: 4884736, this method can be overriden from subclasses of WSDLModelerBase Returns soapbinding:fault name. If null then gives warning for wsi R2721 and uses wsdl:fault name.
      Parameters:
      faultPartName - - to be used by versions < 1.1
      soapFaultName -
      bindFaultName -
      faultMessageName -
      Returns:
      The faultMessageName if not overridden by a subclass
    • addParameterToStructures

      protected void addParameterToStructures(MessagePart part, Parameter parameter, LiteralStructuredType literalType, JavaStructureType javaType)
    • isUnwrappable

      protected boolean isUnwrappable(Message inputMessage)
    • isUnwrappable

      protected boolean isUnwrappable()
    • isWrapperType

      protected boolean isWrapperType(LiteralType type)
    • typeHasNoWildcardElement

      protected boolean typeHasNoWildcardElement(LiteralType type, boolean unwrappable)
    • setUnwrapped

      protected void setUnwrapped(LiteralStructuredType type)
    • processSOAPOperationDocumentLiteralStyle

      protected Operation processSOAPOperationDocumentLiteralStyle()
    • processHeaderFaults

      protected void processHeaderFaults(SOAPHeader header, WSDLModelerBase.ProcessSOAPOperationInfo info, Response response, Set duplicateNames)
    • getHeaderFaultSequenceType

      protected AbstractType getHeaderFaultSequenceType(AbstractType faultType, MessagePart faultPart, QName elemName)
      Parameters:
      faultType -
    • getJavaNameOfSEI

      protected String getJavaNameOfSEI(Port port)
    • createJavaInterfaceForPort

      protected void createJavaInterfaceForPort(Port port)
    • getJavaNameForOperation

      protected String getJavaNameForOperation(Operation operation)
    • createJavaException

      protected boolean createJavaException(Fault fault, Port port, String operationName)
    • getExceptionInfo

      protected WSDLModelerBase.WSDLExceptionInfo getExceptionInfo(Fault fault)
    • createJavaExceptionFromSOAPType

      protected boolean createJavaExceptionFromSOAPType(Fault fault, Port port, String operationName)
    • getLiteralJavaMemberName

      protected String getLiteralJavaMemberName(Fault fault)
    • isEquivalentSOAPStructures

      public boolean isEquivalentSOAPStructures(SOAPStructureType struct1, SOAPStructureType struct2)
    • isEquivalentLiteralStructures

      public boolean isEquivalentLiteralStructures(LiteralStructuredType struct1, LiteralStructuredType struct2)
    • createJavaExceptionFromLiteralType

      protected boolean createJavaExceptionFromLiteralType(Fault fault, Port port, String operationName)
    • createRelativeJavaExceptions

      protected void createRelativeJavaExceptions(Fault fault, Port port, String operationName)
    • getEnvironment

      protected ProcessorEnvironment getEnvironment()
    • warn

      protected void warn(Localizable msg)
    • warn

      protected void warn(String key)
    • warn

      protected void warn(String key, String arg)
    • warn

      protected void warn(String key, Object[] args)
    • info

      protected void info(String key)
    • info

      protected void info(String key, String arg)
    • makePackageQualified

      protected String makePackageQualified(String s, QName name)
    • makePackageQualified

      protected String makePackageQualified(String s, QName name, boolean useNamespaceMapping)
    • makePackageQualified

      protected QName makePackageQualified(QName name)
    • makePackageQualified

      protected QName makePackageQualified(QName name, boolean useNamespaceMapping)
    • makeNameUniqueInSet

      protected String makeNameUniqueInSet(String candidateName, Set names)
    • getUniqueName

      protected String getUniqueName(Operation operation, boolean hasOverloadedOperations)
    • getUniqueParameterName

      protected String getUniqueParameterName(Operation operation, String baseName)
    • getNonQualifiedNameFor

      protected String getNonQualifiedNameFor(QName name)
    • setDocumentationIfPresent

      protected static void setDocumentationIfPresent(ModelObject obj, Documentation documentation)
    • getQNameOf

      protected static QName getQNameOf(GloballyKnown entity)
    • getExtensionOfType

      protected static Extension getExtensionOfType(Extensible extensible, Class type)
    • getAnyExtensionOfType

      protected Extension getAnyExtensionOfType(Extensible extensible, Class type)
    • findMessage

      protected static Message findMessage(QName messageName, WSDLModelerBase.ProcessSOAPOperationInfo info)
    • tokenListContains

      protected static boolean tokenListContains(String tokenList, String target)
    • isConflictingClassName

      protected boolean isConflictingClassName(String name)
    • isConflictingServiceClassName

      protected boolean isConflictingServiceClassName(String name)
    • isConflictingStubClassName

      protected boolean isConflictingStubClassName(String name)
    • isConflictingTieClassName

      protected boolean isConflictingTieClassName(String name)
    • isConflictingPortClassName

      protected boolean isConflictingPortClassName(String name)
    • isConflictingExceptionClassName

      protected boolean isConflictingExceptionClassName(String name)
    • getElementTypeToLiteralType

      protected LiteralType getElementTypeToLiteralType(QName elementType)