Package com.sun.xml.ws.model.wsdl
Class WSDLBoundPortTypeImpl
- java.lang.Object
-
- com.sun.xml.ws.model.wsdl.WSDLBoundPortTypeImpl
-
- All Implemented Interfaces:
EditableWSDLBoundPortType,WSDLBoundPortType,WSDLExtensible,WSDLFeaturedObject,WSDLObject
public final class WSDLBoundPortTypeImpl extends Object implements EditableWSDLBoundPortType
Implementation ofWSDLBoundPortType- Author:
- Vivek Pandey
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<WSDLExtension>extensionsprotected WebServiceFeatureListfeaturesprotected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension>notUnderstoodExtensions
-
Constructor Summary
Constructors Constructor Description WSDLBoundPortTypeImpl(XMLStreamReader xsr, EditableWSDLModel owner, QName name, QName portTypeName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExtension(WSDLExtension ex)Adds a newWSDLExtensionto this object.voidaddFeature(jakarta.xml.ws.WebServiceFeature feature)Enables aWebServiceFeaturebased upon policy assertions on this port.voidaddNotUnderstoodExtension(QName extnEl, Locator locator)This can be used if a WSDL extension element that has wsdl:required=true is not understoodbooleanareRequiredExtensionsUnderstood()This method should be called after freezing the WSDLModelvoidfreeze()Freezes WSDL model to prevent further modificationEditableWSDLBoundOperationget(QName operationName)Gets theWSDLBoundOperationfor a given operation nameParameterBindinggetBinding(QName operation, String part, jakarta.jws.WebParam.Mode mode)Gets theParameterBindingfor a given operation, part name and the direction - IN/OUTBindingIDgetBindingId()Returns the binding ID.Iterable<EditableWSDLBoundOperation>getBindingOperations()Gets theWSDLBoundOperations<T extends WSDLExtension>
TgetExtension(Class<T> type)Gets the extension that is assignable to the given type.Iterable<WSDLExtension>getExtensions()Gets all theWSDLExtensions added throughWSDLExtensible.addExtension(WSDLExtension).<T extends WSDLExtension>
Iterable<T>getExtensions(Class<T> type)Gets all the extensions that is assignable to the given type.<F extends jakarta.xml.ws.WebServiceFeature>
FgetFeature(Class<F> featureType)jakarta.xml.ws.WebServiceFeaturegetFeature(String id)WebServiceFeatureListgetFeatures()Gets the feature list associated with this object.LocatorgetLocation()Gets the source location information in the parsed WSDL.QNamegetName()Gets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace as the namespace uri.List<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension>getNotUnderstoodExtensions()Lists extensions marked as not understoodEditableWSDLBoundOperationgetOperation(String namespaceUri, String localName)Gets the bound operation in this port for a tag name.EditableWSDLModelgetOwner()Gets theWSDLModelthat owns this port type.EditableWSDLPortTypegetPortType()Gets theWSDLPortTypeassociated with the wsdl:bindingQNamegetPortTypeName()Gets the wsdl:binding@type value, same asWSDLPortType.getName()jakarta.jws.soap.SOAPBinding.StylegetStyle()Is this a document style or RPC style? Since we only support literal and not encoding, this means either doc/lit or rpc/lit.booleanisDoclit()booleanisRpcLit()voidput(QName opName, EditableWSDLBoundOperation ptOp)Populates the Map that holds operation name as key andWSDLBoundOperationas the value.voidsetBindingId(BindingID bindingId)Sets the binding IDvoidsetStyle(jakarta.jws.soap.SOAPBinding.Style style)sets whether theWSDLBoundPortTypeis rpc or lit-
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.WSDLExtensible
addExtension, addNotUnderstoodExtension, areRequiredExtensionsUnderstood, getExtension, getExtensions, getExtensions, getNotUnderstoodExtensions
-
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.WSDLObject
getLocation
-
-
-
-
Field Detail
-
features
protected WebServiceFeatureList features
-
extensions
protected final Set<WSDLExtension> extensions
-
notUnderstoodExtensions
protected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> notUnderstoodExtensions
-
-
Constructor Detail
-
WSDLBoundPortTypeImpl
public WSDLBoundPortTypeImpl(XMLStreamReader xsr, @NotNull EditableWSDLModel owner, QName name, QName portTypeName)
-
-
Method Detail
-
getName
public QName getName()
Description copied from interface:WSDLBoundPortTypeGets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace as the namespace uri.- Specified by:
getNamein interfaceWSDLBoundPortType
-
getOwner
@NotNull public EditableWSDLModel getOwner()
Description copied from interface:WSDLBoundPortTypeGets theWSDLModelthat owns this port type.- Specified by:
getOwnerin interfaceEditableWSDLBoundPortType- Specified by:
getOwnerin interfaceWSDLBoundPortType
-
get
public EditableWSDLBoundOperation get(QName operationName)
Description copied from interface:WSDLBoundPortTypeGets theWSDLBoundOperationfor a given operation name- Specified by:
getin interfaceEditableWSDLBoundPortType- Specified by:
getin interfaceWSDLBoundPortType- Parameters:
operationName- non-null operationName- Returns:
- null if a
WSDLBoundOperationis not found
-
put
public void put(QName opName, EditableWSDLBoundOperation ptOp)
Populates the Map that holds operation name as key andWSDLBoundOperationas the value.- Specified by:
putin interfaceEditableWSDLBoundPortType- Parameters:
opName- Must be non-nullptOp- Must be non-null- Throws:
NullPointerException- if either opName or ptOp is null
-
getPortTypeName
public QName getPortTypeName()
Description copied from interface:WSDLBoundPortTypeGets the wsdl:binding@type value, same asWSDLPortType.getName()- Specified by:
getPortTypeNamein interfaceWSDLBoundPortType
-
getPortType
public EditableWSDLPortType getPortType()
Description copied from interface:WSDLBoundPortTypeGets theWSDLPortTypeassociated with the wsdl:binding- Specified by:
getPortTypein interfaceEditableWSDLBoundPortType- Specified by:
getPortTypein interfaceWSDLBoundPortType
-
getBindingOperations
public Iterable<EditableWSDLBoundOperation> getBindingOperations()
Description copied from interface:WSDLBoundPortTypeGets theWSDLBoundOperations- Specified by:
getBindingOperationsin interfaceEditableWSDLBoundPortType- Specified by:
getBindingOperationsin interfaceWSDLBoundPortType
-
getBindingId
public BindingID getBindingId()
Description copied from interface:WSDLBoundPortTypeReturns the binding ID. This would typically determined by the binding extension elements in wsdl:binding.- Specified by:
getBindingIdin interfaceWSDLBoundPortType
-
setBindingId
public void setBindingId(BindingID bindingId)
Description copied from interface:EditableWSDLBoundPortTypeSets the binding ID- Specified by:
setBindingIdin interfaceEditableWSDLBoundPortType- Parameters:
bindingId- Binding ID
-
setStyle
public void setStyle(jakarta.jws.soap.SOAPBinding.Style style)
Description copied from interface:EditableWSDLBoundPortTypesets whether theWSDLBoundPortTypeis rpc or lit- Specified by:
setStylein interfaceEditableWSDLBoundPortType
-
getStyle
public jakarta.jws.soap.SOAPBinding.Style getStyle()
Description copied from interface:WSDLBoundPortTypeIs 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:
getStylein interfaceWSDLBoundPortType
-
isRpcLit
public boolean isRpcLit()
-
isDoclit
public boolean isDoclit()
-
getBinding
public ParameterBinding getBinding(QName operation, String part, jakarta.jws.WebParam.Mode mode)
Gets theParameterBindingfor a given operation, part name and the direction - IN/OUT- Specified by:
getBindingin interfaceWSDLBoundPortType- 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.INorWebParam.Mode.OUT. Must be non-null.- Returns:
- null if the binding could not be resolved for the part.
-
getOperation
public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName)
Description copied from interface:WSDLBoundPortTypeGets 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 beWSDLBoundOperation.getName().If you have a
Messageand trying to figure out which operation it belongs to, always useMessage.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
WSDLBoundOperationfrom 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:
getOperationin interfaceEditableWSDLBoundPortType- Specified by:
getOperationin interfaceWSDLBoundPortType- 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:EditableWSDLBoundPortTypeFreezes WSDL model to prevent further modification- Specified by:
freezein interfaceEditableWSDLBoundPortType
-
addFeature
public final void addFeature(jakarta.xml.ws.WebServiceFeature feature)
Description copied from interface:WSDLFeaturedObjectEnables aWebServiceFeaturebased upon policy assertions on this port. This method would be called during WSDL parsing by WS-Policy code.- Specified by:
addFeaturein interfaceWSDLFeaturedObject
-
getFeatures
@NotNull public WebServiceFeatureList getFeatures()
Description copied from interface:WSDLFeaturedObjectGets the feature list associated with this object.- Specified by:
getFeaturesin interfaceWSDLFeaturedObject
-
getFeature
public final jakarta.xml.ws.WebServiceFeature getFeature(String id)
-
getFeature
@Nullable public <F extends jakarta.xml.ws.WebServiceFeature> F getFeature(@NotNull Class<F> featureType)- Specified by:
getFeaturein interfaceWSDLFeaturedObject
-
getExtensions
public final Iterable<WSDLExtension> getExtensions()
Description copied from interface:WSDLExtensibleGets all theWSDLExtensions added throughWSDLExtensible.addExtension(WSDLExtension).- Specified by:
getExtensionsin interfaceWSDLExtensible- Returns:
- never null.
-
getExtensions
public final <T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type)
Description copied from interface:WSDLExtensibleGets 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:
getExtensionsin interfaceWSDLExtensible- 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:WSDLExtensibleGets 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:
getExtensionin interfaceWSDLExtensible- Returns:
- null if the extension was not found.
-
addExtension
public void addExtension(WSDLExtension ex)
Description copied from interface:WSDLExtensibleAdds a newWSDLExtensionto this object.- Specified by:
addExtensionin interfaceWSDLExtensible- Parameters:
ex- must not be null.
-
getNotUnderstoodExtensions
public List<? extends com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> getNotUnderstoodExtensions()
Description copied from interface:WSDLExtensibleLists extensions marked as not understood- Specified by:
getNotUnderstoodExtensionsin interfaceWSDLExtensible- 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:
addNotUnderstoodExtensionin interfaceWSDLExtensible- Parameters:
extnEl-locator-
-
areRequiredExtensionsUnderstood
public boolean areRequiredExtensionsUnderstood()
This method should be called after freezing the WSDLModel- Specified by:
areRequiredExtensionsUnderstoodin interfaceWSDLExtensible- Returns:
- true if all wsdl required extensions on Port and Binding are understood
-
getLocation
@NotNull public final Locator getLocation()
Description copied from interface:WSDLObjectGets the source location information in the parsed WSDL. This is useful when producing error messages.- Specified by:
getLocationin interfaceWSDLObject
-
-