This feature can be used during the creation of SEI proxy, and
javax.xml.ws.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
| Modifier and Type | Class and Description |
|---|---|
| public static enum | 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. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ID
Constant value identifying the AddressingFeature |
| protected boolean | required
If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. |
| private final AddressingFeature. |
| Access | Constructor and Description |
|---|---|
| public | AddressingFeature()
Creates and configures an |
| public | AddressingFeature(boolean
true enables ws-addressing i.e.ws-addressing
is supported but doesn't require its use enabled)Creates and configures an |
| public | AddressingFeature(boolean
true enables ws-addressing i.e.ws-addressing
is supported but doesn't require its use enabled, boolean true means requires the use of ws-addressing . required)Creates and configures an |
| public | AddressingFeature(boolean
true enables ws-addressing i.e.ws-addressing
is supported but doesn't require its use enabled, boolean true means requires the use of ws-addressing . required, AddressingFeature.specifies what type of responses are required responsesCreates and configures an |
| Modifier and Type | Method and Description |
|---|---|
| public String | getID()
Implements abstract javax. |
| public AddressingFeature. | Returns: Responses#ALL when endpoint supports all types of
responses,
Responses#ANONYMOUS when endpoint requires the use of
only anonymous responses,
Responses#NON_ANONYMOUS when endpoint requires the use
of only non-anonymous responsesIf addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses. |
| public boolean | Returns: the current required valueIf addressing is enabled, this property determines whether the endpoint requires WS-Addressing. |
| ID | back to summary |
|---|---|
| public static final String ID Constant value identifying the AddressingFeature | |
| required | back to summary |
|---|---|
| protected boolean required If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, WS-Addressing headers MUST be present on incoming and outgoing messages. | |
| responses | back to summary |
|---|---|
| private final AddressingFeature. | |
| AddressingFeature | back to summary |
|---|---|
| public AddressingFeature() Creates and configures an | |
| AddressingFeature | back to summary |
|---|---|
| public AddressingFeature(boolean enabled) Creates and configures an
| |
| AddressingFeature | back to summary |
|---|---|
| public AddressingFeature(boolean enabled, boolean required) Creates and configures an
| |
| AddressingFeature | back to summary |
|---|---|
| public AddressingFeature(boolean enabled, boolean required, AddressingFeature. Creates and configures an
| |
| getID | back to summary |
|---|---|
| public String getID() Implements abstract javax. Doc from javax. Get the unique identifier for this WebServiceFeature.
| |
| getResponses | back to summary |
|---|---|
| public AddressingFeature. If addressing is enabled, this property determines whether endpoint requires the use of anonymous responses, or non-anonymous responses, or all responses.
| |
| isRequired | back to summary |
|---|---|
| public boolean isRequired() If addressing is enabled, this property determines whether the endpoint requires WS-Addressing. If required is true, WS-Addressing headers MUST be present on incoming and outgoing messages.
| |
Responses#ALL supports all response types and this is the default
value.
Responses#ANONYMOUS requires the use of only anonymous
responses. It will result into wsam:AnonymousResponses nested assertion
as specified in
3.1.2 AnonymousResponses Assertion in the generated WSDL.
Responses#NON_ANONYMOUS requires the use of only non-anonymous
responses. It will result into
wsam:NonAnonymousResponses nested assertion as specified in
3.1.3 NonAnonymousResponses Assertion in the generated WSDL.
| Modifier and Type | Field and Description |
|---|---|
| public static final AddressingFeature. | ALL
Supports all response types and this is the default |
| public static final AddressingFeature. | ANONYMOUS
Specifies the use of only anonymous responses. |
| public static final AddressingFeature. | NON_ANONYMOUS
Specifies the use of only non-anonymous responses. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AddressingFeature. | |
| public static AddressingFeature. |
| ALL | back to summary |
|---|---|
| public static final AddressingFeature. Supports all response types and this is the default | |
| ANONYMOUS | back to summary |
|---|---|
| public static final AddressingFeature. Specifies the use of only anonymous responses. It will result into wsam:AnonymousResponses nested assertion as specified in 3.1.2 AnonymousResponses Assertion in the generated WSDL. | |
| NON_ANONYMOUS | back to summary |
|---|---|
| public static final AddressingFeature. Specifies the use of only non-anonymous responses. It will result into wsam:NonAnonymousResponses nested assertion as specified in 3.1.3 NonAnonymousResponses Assertion in the generated WSDL. | |
| Responses | back to summary |
|---|---|
| private Responses() | |
| valueOf | back to summary |
|---|---|
| public static AddressingFeature. | |
| values | back to summary |
|---|---|
| public static AddressingFeature. | |