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
Implementation of
WSDLBoundPortType- Author:
- Vivek Pandey
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<WSDLExtension>protected WebServiceFeatureListprotected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> -
Constructor Summary
ConstructorsConstructorDescriptionWSDLBoundPortTypeImpl(XMLStreamReader xsr, EditableWSDLModel owner, QName name, QName portTypeName) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a newWSDLExtensionto this object.final 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 understoodbooleanThis method should be called after freezing the WSDLModelvoidfreeze()Freezes WSDL model to prevent further modificationGets theWSDLBoundOperationfor a given operation namegetBinding(QName operation, String part, jakarta.jws.WebParam.Mode mode) Gets theParameterBindingfor a given operation, part name and the direction - IN/OUTReturns the binding ID.Gets theWSDLBoundOperations<T extends WSDLExtension>
TgetExtension(Class<T> type) Gets the extension that is assignable to the given type.final Iterable<WSDLExtension>Gets all theWSDLExtensions added throughWSDLExtensible.addExtension(WSDLExtension).final <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) final jakarta.xml.ws.WebServiceFeaturegetFeature(String id) Gets the feature list associated with this object.final LocatorGets the source location information in the parsed WSDL.getName()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>Lists extensions marked as not understoodgetOperation(String namespaceUri, String localName) Gets the bound operation in this port for a tag name.getOwner()Gets theWSDLModelthat owns this port type.Gets theWSDLPortTypeassociated with the wsdl:bindingGets 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 litMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLExtensible
addExtension, addNotUnderstoodExtension, areRequiredExtensionsUnderstood, getExtension, getExtensions, getExtensions, getNotUnderstoodExtensionsMethods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLFeaturedObject
addFeature, getFeature, getFeaturesMethods inherited from interface com.sun.xml.ws.api.model.wsdl.WSDLObject
getLocation
-
Field Details
-
features
-
extensions
-
notUnderstoodExtensions
protected List<com.sun.xml.ws.model.wsdl.AbstractExtensibleImpl.UnknownWSDLExtension> notUnderstoodExtensions
-
-
Constructor Details
-
WSDLBoundPortTypeImpl
public WSDLBoundPortTypeImpl(XMLStreamReader xsr, @NotNull EditableWSDLModel owner, QName name, QName portTypeName)
-
-
Method Details
-
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
Description copied from interface:WSDLBoundPortTypeGets theWSDLModelthat owns this port type.- Specified by:
getOwnerin interfaceEditableWSDLBoundPortType- Specified by:
getOwnerin interfaceWSDLBoundPortType
-
get
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
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
Description copied from interface:WSDLBoundPortTypeGets the wsdl:binding@type value, same asWSDLPortType.getName()- Specified by:
getPortTypeNamein interfaceWSDLBoundPortType
-
getPortType
Description copied from interface:WSDLBoundPortTypeGets theWSDLPortTypeassociated with the wsdl:binding- Specified by:
getPortTypein interfaceEditableWSDLBoundPortType- Specified by:
getPortTypein interfaceWSDLBoundPortType
-
getBindingOperations
Description copied from interface:WSDLBoundPortTypeGets theWSDLBoundOperations- Specified by:
getBindingOperationsin interfaceEditableWSDLBoundPortType- Specified by:
getBindingOperationsin interfaceWSDLBoundPortType
-
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
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
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
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
Description copied from interface:WSDLFeaturedObjectGets the feature list associated with this object.- Specified by:
getFeaturesin interfaceWSDLFeaturedObject
-
getFeature
-
getFeature
@Nullable public <F extends jakarta.xml.ws.WebServiceFeature> F getFeature(@NotNull Class<F> featureType) - Specified by:
getFeaturein interfaceWSDLFeaturedObject
-
getExtensions
Description copied from interface:WSDLExtensibleGets all theWSDLExtensions added throughWSDLExtensible.addExtension(WSDLExtension).- Specified by:
getExtensionsin interfaceWSDLExtensible- Returns:
- never null.
-
getExtensions
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
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
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
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
Description copied from interface:WSDLObjectGets the source location information in the parsed WSDL. This is useful when producing error messages.- Specified by:
getLocationin interfaceWSDLObject
-