|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.ws.WebServiceFeature javax.xml.ws.soap.AddressingFeature
public final class AddressingFeature
AddressingFeature represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature with any other binding is undefined.
This feature can be used during the creation of SEI proxy, and
Dispatch
instances on the client side and Endpoint
instances on the server side. This feature cannot be used for Service
instance creation on the client side.
The following describes the effects of this feature with respect to be enabled or disabled:
If the feature is enabled, the required
property determines
whether the endpoint requires WS-Addressing. If it is set true,
WS-Addressing headers MUST be present on incoming and outgoing messages.
By default the required
property is false
.
If the web service developer has not explicitly enabled this feature, WSDL's wsam:Addressing policy assertion is used to find the use of WS-Addressing. By using the feature explicitly, an application overrides WSDL's indication of the use of WS-Addressing. In some cases, this is really required. For example, if an application has implemented WS-Addressing itself, it can use this feature to disable addressing. That means a JAX-WS implementation doesn't consume or produce WS-Addressing headers.
If addressing is enabled, a corresponding wsam:Addressing policy assertion must be generated in the WSDL as per 3.1 WS-Policy Assertions
Example 1: Possible Policy Assertion in the generated WSDL for
@Addressing
<wsam:Addressing wsp:Optional="true"> <wsp:Policy/> </wsam:Addressing>
Example 2: Possible Policy Assertion in the generated WSDL for
@Addressing(required=true)
<wsam:Addressing> <wsp:Policy/> </wsam:Addressing>
Example 3: Possible Policy Assertion in the generated WSDL for
@Addressing(required=true, responses=Responses.ANONYMOUS)
<wsam:Addressing> <wsp:Policy> <wsam:AnonymousResponses/> </wsp:Policy> </wsam:Addressing>
See Web Services Addressing - Core, Web Services Addressing 1.0 - SOAP Binding, and Web Services Addressing 1.0 - Metadata for more information on WS-Addressing.
Addressing
Nested Class Summary | |
---|---|
static class |
AddressingFeature.Responses
If addressing is enabled, this property determines if endpoint requires the use of only anonymous responses, or only non-anonymous responses, or all. |
Field Summary | |
---|---|
static java.lang.String |
ID
Constant value identifying the AddressingFeature |
protected boolean |
required
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. |
Fields inherited from class javax.xml.ws.WebServiceFeature |
---|
enabled |
Constructor Summary | |
---|---|
AddressingFeature()
Creates and configures an AddressingFeature with the
use of addressing requirements. |
|
AddressingFeature(boolean enabled)
Creates and configures an AddressingFeature with the
use of addressing requirements. |
|
AddressingFeature(boolean enabled,
boolean required)
Creates and configures an AddressingFeature with the
use of addressing requirements. |
|
AddressingFeature(boolean enabled,
boolean required,
AddressingFeature.Responses responses)
Creates and configures an AddressingFeature with the
use of addressing requirements. |
Method Summary | |
---|---|
java.lang.String |
getID()
Get the unique identifier for this WebServiceFeature. |
AddressingFeature.Responses |
getResponses()
If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses. |
boolean |
isRequired()
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. |
Methods inherited from class javax.xml.ws.WebServiceFeature |
---|
isEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ID
protected boolean required
Constructor Detail |
---|
public AddressingFeature()
AddressingFeature
with the
use of addressing requirements. The created feature enables
ws-addressing i.e. supports ws-addressing but doesn't require
its use. It is also configured to accept all the response types.
public AddressingFeature(boolean enabled)
AddressingFeature
with the
use of addressing requirements. If enabled
is true,
it enables ws-addressing i.e. supports ws-addressing but doesn't
require its use. It also configures to accept all the response types.
enabled
- true enables ws-addressing i.e.ws-addressing
is supported but doesn't require its usepublic AddressingFeature(boolean enabled, boolean required)
AddressingFeature
with the
use of addressing requirements. If enabled
and
required
are true, it enables ws-addressing and
requires its use. It also configures to accept all the response types.
enabled
- true enables ws-addressing i.e.ws-addressing
is supported but doesn't require its userequired
- true means requires the use of ws-addressing .public AddressingFeature(boolean enabled, boolean required, AddressingFeature.Responses responses)
AddressingFeature
with the
use of addressing requirements. If enabled
and
required
are true, it enables ws-addressing and
requires its use. Also, the response types can be configured using
responses
parameter.
enabled
- true enables ws-addressing i.e.ws-addressing
is supported but doesn't require its userequired
- true means requires the use of ws-addressing .responses
- specifies what type of responses are requiredMethod Detail |
---|
public java.lang.String getID()
getID
in class WebServiceFeature
public boolean isRequired()
public AddressingFeature.Responses getResponses()
AddressingFeature.Responses.ALL
when endpoint supports all types of
responses,
AddressingFeature.Responses.ANONYMOUS
when endpoint requires the use of
only anonymous responses,
AddressingFeature.Responses.NON_ANONYMOUS
when endpoint requires the use
of only non-anonymous responses
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41