com.sun.xml.ws.model.wsdl
Class WSDLBoundPortTypeImpl

java.lang.Object
  extended by com.sun.xml.ws.model.wsdl.AbstractObjectImpl
      extended by com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl
          extended by com.sun.xml.ws.model.wsdl.AbstractFeaturedObjectImpl
              extended by com.sun.xml.ws.model.wsdl.WSDLBoundPortTypeImpl
All Implemented Interfaces:
WSDLBoundPortType, WSDLExtensible, WSDLFeaturedObject, WSDLObject

public final class WSDLBoundPortTypeImpl
extends AbstractFeaturedObjectImpl
implements WSDLBoundPortType

Implementation of WSDLBoundPortType


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl
AbstractExtensibleImpl.UnknownWSDLExtension
 
Field Summary
 
Fields inherited from class com.sun.xml.ws.model.wsdl.AbstractFeaturedObjectImpl
features
 
Fields inherited from class com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl
extensions, notUnderstoodExtensions
 
Constructor Summary
WSDLBoundPortTypeImpl(javax.xml.stream.XMLStreamReader xsr, WSDLModelImpl owner, QName name, QName portTypeName)
           
 
Method Summary
 void enableMTOM()
           
(package private)  void freeze()
           
 WSDLBoundOperationImpl get(QName operationName)
          Gets the WSDLBoundOperation for a given operation name
 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
 BindingID getBindingId()
          Returns the binding ID.
 Iterable<WSDLBoundOperationImpl> getBindingOperations()
          Gets the WSDLBoundOperations
 String getMimeType(QName operation, String part, javax.jws.WebParam.Mode mode)
          Gets mime:content@part value which is the MIME type for a given operation, part and WebParam.Mode.
 QName getName()
          Gets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace as the namespace uri.
 WSDLBoundOperationImpl getOperation(String namespaceUri, String localName)
          Gets the bound operation in this port for a tag name.
 WSDLModelImpl getOwner()
          Gets the WSDLModel that owns this port type.
 WSDLPortTypeImpl getPortType()
          Gets the WSDLPortType associated with the wsdl:binding
 QName getPortTypeName()
          Gets the wsdl:binding@type value, same as WSDLPortType.getName()
 SOAPVersion getSOAPVersion()
           
 javax.jws.soap.SOAPBinding.Style getStyle()
          Is this a document style or RPC style? Since we only support literal and not encoding, this means either doc/lit or rpc/lit.
 boolean isDoclit()
           
 boolean isMTOMEnabled()
           
 boolean isRpcLit()
           
 void put(QName opName, WSDLBoundOperationImpl ptOp)
          Populates the Map that holds operation name as key and WSDLBoundOperation as the value.
 void setBindingId(BindingID bindingId)
           
 void setStyle(javax.jws.soap.SOAPBinding.Style style)
           
 
Methods inherited from class com.sun.xml.ws.model.wsdl.AbstractFeaturedObjectImpl
addFeature, getFeature, getFeature, getFeatures
 
Methods inherited from class com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl
addExtension, addNotUnderstoodExtension, areRequiredExtensionsUnderstood, getExtension, getExtensions, getExtensions
 
Methods inherited from class com.sun.xml.ws.model.wsdl.AbstractObjectImpl
getLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLFeaturedObject
addFeature, getFeature, getFeatures
 
Methods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLExtensible
addExtension, getExtension, getExtensions, getExtensions
 
Methods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLObject
getLocation
 

Constructor Detail

WSDLBoundPortTypeImpl

public WSDLBoundPortTypeImpl(javax.xml.stream.XMLStreamReader xsr,
                             @NotNull
                             WSDLModelImpl owner,
                             QName name,
                             QName portTypeName)
Method Detail

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 WSDLModelImpl getOwner()
Description copied from interface: WSDLBoundPortType
Gets the WSDLModel that owns this port type.

Specified by:
getOwner in interface WSDLBoundPortType

get

public WSDLBoundOperationImpl get(QName operationName)
Description copied from interface: WSDLBoundPortType
Gets the WSDLBoundOperation for a given operation name

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,
                WSDLBoundOperationImpl ptOp)
Populates the Map that holds operation name as key and WSDLBoundOperation as the value.

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 WSDLPortTypeImpl getPortType()
Description copied from interface: WSDLBoundPortType
Gets the WSDLPortType associated with the wsdl:binding

Specified by:
getPortType in interface WSDLBoundPortType

getBindingOperations

public Iterable<WSDLBoundOperationImpl> getBindingOperations()
Description copied from interface: WSDLBoundPortType
Gets the WSDLBoundOperations

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)

setStyle

public void setStyle(javax.jws.soap.SOAPBinding.Style style)

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

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 Mode@OUT. Must be non-null.
Returns:
null if the binding could not be resolved for the part.

getMimeType

public String getMimeType(QName operation,
                          String part,
                          javax.jws.WebParam.Mode mode)
Gets mime:content@part value which is the MIME type for a given operation, part and WebParam.Mode.

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 Mode@OUT. Must be non-null.
Returns:
null if the binding could not be resolved for the part.

getOperation

public WSDLBoundOperationImpl 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 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.

enableMTOM

public void enableMTOM()

isMTOMEnabled

public boolean isMTOMEnabled()

getSOAPVersion

public SOAPVersion getSOAPVersion()

freeze

void freeze()