Class WSDLBoundPortTypeImpl

java.lang.Object
com.sun.xml.ws.model.wsdl.WSDLBoundPortTypeImpl
All Implemented Interfaces:
com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType, WSDLBoundPortType, WSDLExtensible, WSDLFeaturedObject, WSDLObject

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

    • features

      protected WebServiceFeatureList features
    • extensions

      protected final Set<WSDLExtension> extensions
    • notUnderstoodExtensions

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

    • WSDLBoundPortTypeImpl

      public WSDLBoundPortTypeImpl(XMLStreamReader xsr, @NotNull com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel owner, QName name, QName portTypeName)
  • Method Details

    • getName

      public QName getName()
      Description copied from interface: WSDLBoundPortType
      Gets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace as the namespace uri.
      Specified by:
      getName in interface WSDLBoundPortType
    • getOwner

      @NotNull public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLModel getOwner()
      Description copied from interface: WSDLBoundPortType
      Gets the WSDLModel that owns this port type.
      Specified by:
      getOwner in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Specified by:
      getOwner in interface WSDLBoundPortType
    • get

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundOperation get(QName operationName)
      Description copied from interface: WSDLBoundPortType
      Gets the WSDLBoundOperation for a given operation name
      Specified by:
      get in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Specified by:
      get in interface WSDLBoundPortType
      Parameters:
      operationName - non-null operationName
      Returns:
      null if a WSDLBoundOperation is not found
    • put

      public void put(QName opName, com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundOperation ptOp)
      Populates the Map that holds operation name as key and WSDLBoundOperation as the value.
      Specified by:
      put in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Parameters:
      opName - Must be non-null
      ptOp - Must be non-null
      Throws:
      NullPointerException - if either opName or ptOp is null
    • getPortTypeName

      public QName getPortTypeName()
      Description copied from interface: WSDLBoundPortType
      Gets the wsdl:binding@type value, same as WSDLPortType.getName()
      Specified by:
      getPortTypeName in interface WSDLBoundPortType
    • getPortType

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLPortType getPortType()
      Description copied from interface: WSDLBoundPortType
      Gets the WSDLPortType associated with the wsdl:binding
      Specified by:
      getPortType in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Specified by:
      getPortType in interface WSDLBoundPortType
    • getBindingOperations

      public Iterable<com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundOperation> getBindingOperations()
      Description copied from interface: WSDLBoundPortType
      Specified by:
      getBindingOperations in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Specified by:
      getBindingOperations in interface WSDLBoundPortType
    • getBindingId

      public BindingID getBindingId()
      Description copied from interface: WSDLBoundPortType
      Returns the binding ID. This would typically determined by the binding extension elements in wsdl:binding.
      Specified by:
      getBindingId in interface WSDLBoundPortType
    • setBindingId

      public void setBindingId(BindingID bindingId)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Sets the binding ID
      Specified by:
      setBindingId in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Parameters:
      bindingId - Binding ID
    • setStyle

      public void setStyle(javax.jws.soap.SOAPBinding.Style style)
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      sets whether the WSDLBoundPortType is rpc or lit
      Specified by:
      setStyle in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
    • getStyle

      public javax.jws.soap.SOAPBinding.Style getStyle()
      Description copied from interface: WSDLBoundPortType
      Is this a document style or RPC style? Since we only support literal and not encoding, this means either doc/lit or rpc/lit.
      Specified by:
      getStyle in interface WSDLBoundPortType
    • isRpcLit

      public boolean isRpcLit()
    • isDoclit

      public boolean isDoclit()
    • getBinding

      public ParameterBinding getBinding(QName operation, String part, javax.jws.WebParam.Mode mode)
      Gets the ParameterBinding for a given operation, part name and the direction - IN/OUT
      Specified by:
      getBinding in interface WSDLBoundPortType
      Parameters:
      operation - wsdl:operation@name value. Must be non-null.
      part - wsdl:part@name such as value of soap:header@part. Must be non-null.
      mode - WebParam.Mode.IN or WebParam.Mode.OUT. Must be non-null.
      Returns:
      null if the binding could not be resolved for the part.
    • getOperation

      public com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundOperation getOperation(String namespaceUri, String localName)
      Description copied from interface: WSDLBoundPortType
      Gets the bound operation in this port for a tag name. Here the operation would be the one whose input part descriptor bound to soap:body is same as the tag name except for rpclit where the tag name would be WSDLBoundOperation.getName().

      If you have a Message and trying to figure out which operation it belongs to, always use Message.getOperation(com.sun.xml.ws.api.model.wsdl.WSDLBoundPortType), as that performs better.

      For example this can be used in the case when a message receipient can get the WSDLBoundOperation from the payload tag name.

      namespaceUri and the local name both can be null to get the WSDLBoundOperation that has empty body - there is no payload. According to BP 1.1 in a port there can be at MOST one operation with empty body. Its an error to have namespace URI non-null but local name as null.

      Specified by:
      getOperation in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Specified by:
      getOperation in interface WSDLBoundPortType
      Parameters:
      namespaceUri - namespace of the payload element.
      localName - local name of the payload
      Returns:
      null if no operation with the given tag name is found.
    • freeze

      public void freeze()
      Description copied from interface: com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
      Freezes WSDL model to prevent further modification
      Specified by:
      freeze in interface com.sun.xml.ws.api.model.wsdl.editable.EditableWSDLBoundPortType
    • addFeature

      public final void addFeature(javax.xml.ws.WebServiceFeature feature)
      Description copied from interface: WSDLFeaturedObject
      Enables a WebServiceFeature based upon policy assertions on this port. This method would be called during WSDL parsing by WS-Policy code.
      Specified by:
      addFeature in interface WSDLFeaturedObject
    • getFeatures

      @NotNull public WebServiceFeatureList getFeatures()
      Description copied from interface: WSDLFeaturedObject
      Gets the feature list associated with this object.
      Specified by:
      getFeatures in interface WSDLFeaturedObject
    • getFeature

      public final javax.xml.ws.WebServiceFeature getFeature(String id)
    • getFeature

      @Nullable public <F extends javax.xml.ws.WebServiceFeature> F getFeature(@NotNull Class<F> featureType)
      Specified by:
      getFeature in interface WSDLFeaturedObject
    • 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