Class WSDLModelImpl

java.lang.Object
com.sun.xml.ws.model.wsdl.WSDLModelImpl
All Implemented Interfaces:
com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel, WSDLExtensible, WSDLModel, WSDLObject

public final class WSDLModelImpl extends Object implements com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
Implementation of WSDLModel
Author:
Vivek Pandey
  • Field Details

    • extensions

      protected final Set<WSDLExtension> extensions
    • notUnderstoodExtensions

      protected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> notUnderstoodExtensions
  • Constructor Details

    • WSDLModelImpl

      public WSDLModelImpl(@NotNull String systemId)
    • WSDLModelImpl

      public WSDLModelImpl()
      To create WSDLModelImpl from WSDL that doesn't have a system ID.
  • Method Details

    • addMessage

      public void addMessage(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLMessage msg)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Add message
      Specified by:
      addMessage in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Parameters:
      msg - Message
    • getMessage

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLMessage getMessage(QName name)
      Description copied from interface: WSDLModel
      Returns the message with the given QName
      Specified by:
      getMessage in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getMessage in interface WSDLModel
      Parameters:
      name - Message name
      Returns:
      Message
    • addPortType

      public void addPortType(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType pt)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Add port type
      Specified by:
      addPortType in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Parameters:
      pt - Port type
    • getPortType

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType getPortType(QName name)
      Description copied from interface: WSDLModel
      Gets WSDLPortType that models wsdl:portType
      Specified by:
      getPortType in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getPortType in interface WSDLModel
      Parameters:
      name - non-null quaified name of wsdl:message, where the localName is the value of wsdl:portType@name and the namespaceURI is the value of wsdl:definitions@targetNamespace
      Returns:
      A WSDLPortType or null if no wsdl:portType found.
    • addBinding

      public void addBinding(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType boundPortType)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Add Binding
      Specified by:
      addBinding in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Parameters:
      boundPortType - Bound port type
    • getBinding

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType getBinding(QName name)
      Description copied from interface: WSDLModel
      Gets WSDLBoundPortType that models wsdl:binding
      Specified by:
      getBinding in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getBinding in interface WSDLModel
      Parameters:
      name - non-null quaified name of wsdl:binding, where the localName is the value of wsdl:binding@name and the namespaceURI is the value of wsdl:definitions@targetNamespace
      Returns:
      A WSDLBoundPortType or null if no wsdl:binding found
    • addService

      public void addService(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLService svc)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Add service
      Specified by:
      addService in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Parameters:
      svc - Service
    • getService

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLService getService(QName name)
      Description copied from interface: WSDLModel
      Gets WSDLService that models wsdl:service
      Specified by:
      getService in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getService in interface WSDLModel
      Parameters:
      name - non-null quaified name of wsdl:service, where the localName is the value of wsdl:service@name and the namespaceURI is the value of wsdl:definitions@targetNamespace
      Returns:
      A WSDLService or null if no wsdl:service found
    • getMessages

      public Map<QName,com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLMessage> getMessages()
      Description copied from interface: WSDLModel
      Gives a Map of wsdl:message qualified name and WSDLMessage
      Specified by:
      getMessages in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getMessages in interface WSDLModel
      Returns:
      an empty Map if the wsdl document has no wsdl:message
    • getPortTypes

      @NotNull public Map<QName,com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType> getPortTypes()
      Description copied from interface: WSDLModel
      Gives a Map of wsdl:portType QName and WSDLPortType
      Specified by:
      getPortTypes in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getPortTypes in interface WSDLModel
      Returns:
      an empty Map if the wsdl document has no wsdl:portType
    • getBindings

      @NotNull public Map<QName,? extends com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType> getBindings()
      Description copied from interface: WSDLModel
      Gives a Map of wsdl:binding QName and WSDLBoundPortType
      Specified by:
      getBindings in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getBindings in interface WSDLModel
      Returns:
      an empty Map if the wsdl document has no wsdl:binding
    • getServices

      @NotNull public Map<QName,com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLService> getServices()
      Description copied from interface: WSDLModel
      Gives a Map of wsdl:service qualified name and WSDLService
      Specified by:
      getServices in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getServices in interface WSDLModel
      Returns:
      an empty Map if the wsdl document has no wsdl:service
    • getFirstServiceName

      public QName getFirstServiceName()
      Returns the first service QName from insertion order
      Specified by:
      getFirstServiceName in interface WSDLModel
    • getBinding

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType getBinding(QName serviceName, QName portName)
      Description copied from interface: WSDLModel
      Give a WSDLBoundPortType for the given wsdl:service and wsdl:port names.
      Specified by:
      getBinding in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Specified by:
      getBinding in interface WSDLModel
      Parameters:
      serviceName - non-null service QName
      portName - non-null port QName
      Returns:
      WSDLBoundOperation on success otherwise null. throws NPE if any of the parameters null
    • finalizeRpcLitBinding

      public void finalizeRpcLitBinding(com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType boundPortType)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Finalize rpc-lit binding
      Specified by:
      finalizeRpcLitBinding in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Parameters:
      boundPortType - Binding
    • getPolicyMap

      public com.sun.xml.ws.policy.PolicyMap getPolicyMap()
      Gives the PolicyMap associated with the WSDLModel
      Specified by:
      getPolicyMap in interface WSDLModel
      Returns:
      PolicyMap
    • setPolicyMap

      public void setPolicyMap(com.sun.xml.ws.policy.PolicyMap policyMap)
      Set PolicyMap for the WSDLModel.
      Specified by:
      setPolicyMap in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
      Parameters:
      policyMap -
    • freeze

      public void freeze()
      Invoked at the end of the model construction to fix up references, etc.
      Specified by:
      freeze in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel
    • getExtensions

      public final Iterable<WSDLExtension> getExtensions()
      Description copied from interface: WSDLExtensible
      Specified by:
      getExtensions in interface WSDLExtensible
      Returns:
      never null.
    • getExtensions

      public final <T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type)
      Description copied from interface: WSDLExtensible
      Gets all the extensions that is assignable to the given type.

      This allows clients to find specific extensions in a type-safe and convenient way.

      Specified by:
      getExtensions in interface WSDLExtensible
      Parameters:
      type - The type of the extension to obtain. Must not be null.
      Returns:
      Can be an empty fromjava.collection but never null.
    • getExtension

      public <T extends WSDLExtension> T getExtension(Class<T> type)
      Description copied from interface: WSDLExtensible
      Gets the extension that is assignable to the given type.

      This is just a convenient version that does

       Iterator itr = getExtensions(type);
       if(itr.hasNext())  return itr.next();
       else               return null;
       
      Specified by:
      getExtension in interface WSDLExtensible
      Returns:
      null if the extension was not found.
    • addExtension

      public void addExtension(WSDLExtension ex)
      Description copied from interface: WSDLExtensible
      Adds a new WSDLExtension to this object.
      Specified by:
      addExtension in interface WSDLExtensible
      Parameters:
      ex - must not be null.
    • getNotUnderstoodExtensions

      public List<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> getNotUnderstoodExtensions()
      Description copied from interface: WSDLExtensible
      Lists extensions marked as not understood
      Specified by:
      getNotUnderstoodExtensions in interface WSDLExtensible
      Returns:
      List of not understood extensions
    • addNotUnderstoodExtension

      public void addNotUnderstoodExtension(QName extnEl, Locator locator)
      This can be used if a WSDL extension element that has wsdl:required=true is not understood
      Specified by:
      addNotUnderstoodExtension in interface WSDLExtensible
      Parameters:
      extnEl -
      locator -
    • areRequiredExtensionsUnderstood

      public boolean areRequiredExtensionsUnderstood()
      This method should be called after freezing the WSDLModel
      Specified by:
      areRequiredExtensionsUnderstood in interface WSDLExtensible
      Returns:
      true if all wsdl required extensions on Port and Binding are understood
    • getLocation

      @NotNull public final Locator getLocation()
      Description copied from interface: WSDLObject
      Gets the source location information in the parsed WSDL. This is useful when producing error messages.
      Specified by:
      getLocation in interface WSDLObject