Package com.sun.xml.ws.api
Interface WSBinding
-
- All Superinterfaces:
jakarta.xml.ws.Binding
- All Known Implementing Classes:
BindingImpl
,HTTPBindingImpl
,SOAPBindingImpl
public interface WSBinding extends jakarta.xml.ws.Binding
JAX-WS implementation ofBinding
.This object can be created by
BindingID.createBinding()
.Binding conceptually includes the on-the-wire format of the message, this this object owns
Codec
.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addKnownHeader(QName knownHeader)
Adds header QName to set known to be supported by this bindingAddressingVersion
getAddressingVersion()
Gets the WS-Addressing version of this binding.BindingID
getBindingId()
Gets the binding ID, which uniquely identifies the binding.WSFeatureList
getFaultMessageFeatures(QName operationName, QName messageName)
Experimental: Returns a list of features associated withWSBinding
that apply to one of the fault messages of an operation.<F extends jakarta.xml.ws.WebServiceFeature>
FgetFeature(Class<F> featureType)
Gets aWebServiceFeature
of the specific type.WSFeatureList
getFeatures()
Returns a list of features associated withWSBinding
.List<jakarta.xml.ws.handler.Handler>
getHandlerChain()
WSFeatureList
getInputMessageFeatures(QName operationName)
Experimental: Returns a list of features associated withWSBinding
that apply to the input message of an operation.Set<QName>
getKnownHeaders()
Returns set of header QNames known to be supported by this binding.MessageContextFactory
getMessageContextFactory()
<F extends jakarta.xml.ws.WebServiceFeature>
FgetOperationFeature(Class<F> featureType, QName operationName)
Experimental: Gets aWebServiceFeature
of the specific type that applies to an operation.WSFeatureList
getOperationFeatures(QName operationName)
Experimental: Returns a list of features associated withWSBinding
that apply to a particular operation.WSFeatureList
getOutputMessageFeatures(QName operationName)
Experimental: Returns a list of features associated withWSBinding
that apply to the output message of an operation.SOAPVersion
getSOAPVersion()
Gets the SOAP version of this binding.boolean
isFeatureEnabled(Class<? extends jakarta.xml.ws.WebServiceFeature> feature)
Checks if a particularWebServiceFeature
is enabled.boolean
isOperationFeatureEnabled(Class<? extends jakarta.xml.ws.WebServiceFeature> feature, QName operationName)
Experimental: Checks if a particularWebServiceFeature
on an operation is enabled.
-
-
-
Method Detail
-
getSOAPVersion
SOAPVersion getSOAPVersion()
Gets the SOAP version of this binding. TODO: clarify what to do with XML/HTTP bindingThis is just a short-cut for
getBindingID().getSOAPVersion()
- Returns:
- If the binding is using SOAP, this method returns
a
SOAPVersion
constant. If the binding is not based on SOAP, this method returns null. SeeMessage
for how a non-SOAP binding shall be handled byTube
s.
-
getAddressingVersion
AddressingVersion getAddressingVersion()
Gets the WS-Addressing version of this binding.
TODO: clarify what to do with XML/HTTP binding- Returns:
- If the binding is using SOAP and WS-Addressing is enabled,
this method returns a
AddressingVersion
constant. If binding is not using SOAP or WS-Addressing is not enabled, this method returns null. This might be little slow as it has to go over all the features on binding. Its advisable to cache the addressingVersion wherever possible and reuse it.
-
getBindingId
@NotNull BindingID getBindingId()
Gets the binding ID, which uniquely identifies the binding.The relevant specs define the binding IDs and what they mean. The ID is used in many places to identify the kind of binding (such as SOAP1.1, SOAP1.2, REST, ...)
- Returns:
- Always non-null same value.
-
getHandlerChain
@NotNull List<jakarta.xml.ws.handler.Handler> getHandlerChain()
- Specified by:
getHandlerChain
in interfacejakarta.xml.ws.Binding
-
isFeatureEnabled
boolean isFeatureEnabled(@NotNull Class<? extends jakarta.xml.ws.WebServiceFeature> feature)
Checks if a particularWebServiceFeature
is enabled.- Returns:
- true if enabled.
-
isOperationFeatureEnabled
boolean isOperationFeatureEnabled(@NotNull Class<? extends jakarta.xml.ws.WebServiceFeature> feature, @NotNull QName operationName)
Experimental: Checks if a particularWebServiceFeature
on an operation is enabled.- Parameters:
operationName
- The WSDL name of the operation.- Returns:
- true if enabled.
-
getFeature
@Nullable <F extends jakarta.xml.ws.WebServiceFeature> F getFeature(@NotNull Class<F> featureType)
Gets aWebServiceFeature
of the specific type.- Parameters:
featureType
- The type of the feature to retrieve.- Returns:
- If the feature is present and enabled, return a non-null instance. Otherwise null.
-
getOperationFeature
@Nullable <F extends jakarta.xml.ws.WebServiceFeature> F getOperationFeature(@NotNull Class<F> featureType, @NotNull QName operationName)
Experimental: Gets aWebServiceFeature
of the specific type that applies to an operation.- Parameters:
featureType
- The type of the feature to retrieve.operationName
- The WSDL name of the operation.- Returns:
- If the feature is present and enabled, return a non-null instance. Otherwise null.
-
getFeatures
@NotNull WSFeatureList getFeatures()
Returns a list of features associated withWSBinding
.
-
getOperationFeatures
@NotNull WSFeatureList getOperationFeatures(@NotNull QName operationName)
Experimental: Returns a list of features associated withWSBinding
that apply to a particular operation.- Parameters:
operationName
- The WSDL name of the operation.
-
getInputMessageFeatures
@NotNull WSFeatureList getInputMessageFeatures(@NotNull QName operationName)
Experimental: Returns a list of features associated withWSBinding
that apply to the input message of an operation.- Parameters:
operationName
- The WSDL name of the operation.
-
getOutputMessageFeatures
@NotNull WSFeatureList getOutputMessageFeatures(@NotNull QName operationName)
Experimental: Returns a list of features associated withWSBinding
that apply to the output message of an operation.- Parameters:
operationName
- The WSDL name of the operation.
-
getFaultMessageFeatures
@NotNull WSFeatureList getFaultMessageFeatures(@NotNull QName operationName, @NotNull QName messageName)
Experimental: Returns a list of features associated withWSBinding
that apply to one of the fault messages of an operation.- Parameters:
operationName
- The WSDL name of the operation.messageName
- The WSDL name of the fault message.
-
getKnownHeaders
@NotNull Set<QName> getKnownHeaders()
Returns set of header QNames known to be supported by this binding.- Returns:
- Set of known QNames
-
addKnownHeader
boolean addKnownHeader(QName knownHeader)
Adds header QName to set known to be supported by this binding- Parameters:
knownHeader
- Known header QName- Returns:
- true, if new entry was added; false, if known header QName was already known
-
getMessageContextFactory
@NotNull MessageContextFactory getMessageContextFactory()
- Returns:
- A MessageContextFactory configured according to the binding's features.
-
-