+

Search Tips   |   Advanced Search

Enable Web Services Addressing support for JAX-WS applications

The Web Services Addressing (WS-Addressing) support provides mechanisms to address web services and provide addressing information in messages. For JAX-WS applications, we can enable WS-Addressing support in several different ways, such as configuring policy sets or using annotations in code.

Perform this task to enable the WS-Addressing support, either as a service provider or as a client of a service provided by another party.

For service providers, WS-Addressing support is enabled by default, so we do not have to undertake any actions to enable support. However, we can use the enabling mechanisms to modify other WS-Addressing behavior for the service, such as whether WS-Addressing information is required, and what is included in the generated WSDL document.

For service clients, WS-Addressing support is disabled by default. Using one of the following methods to enable WS-Addressing support. The following list is in descending order of precedence, because we can apply multiple methods. For example the deployment descriptor method overrides the use of annotations or features, but is itself overridden by the use of policy sets.

The following tables summarize the behavior of the WS-Addressing support. Use this table to determine whether a request message is accepted for client settings that do not involve policy configuration.

This is a complex table containing spanned column headings. There is a header column entitled "Client settings" which specifies whether WS-Addressing support is enabled on the client and also which messaging style is configured. The second main column shows the policy settings on the provider, with two sub-columns for whether WS-Addressing is optional or mandatory. Both of these sub-columns are further sub-divided into three sub-columns for messaging style (synchronous, asynchronous, or both). The third main column shows the WSDL settings on the provider, with two sub-columns for whether WS-Addressing is optional or mandatory.

Client settings Provider policy settings Provider WSDL settings (UsingAddressing required attribute)
WS-Addressing is optional WS-Addressing is mandatory1
Synchronous and asynchronous Synchronous only Asynchronous only Synchronous and asynchronous Synchronous only Asynchronous only false (WS-Addressing is optional) true (WS-Addressing is mandatory1)
WS-Addressing support enabled and messaging style synchronous Message accepted Message accepted Fault Message accepted Message accepted Fault Message accepted Message accepted
WS-Addressing support enabled and messaging style asynchronous Message accepted Fault Message accepted Message accepted Fault Message accepted Message accepted Message accepted
WS-Addressing support not enabled and messaging style synchronous Message accepted Message accepted Message accepted2 Fault Fault Fault Message accepted Fault
WS-Addressing support not enabled and messaging style asynchronous3 Fault Fault Fault Fault Fault Fault Fault Fault

  1. If WS-Addressing is mandatory, all requests without WS-Addressing headers are rejected.

  2. The messaging style is only enforced if WS-Addressing headers are present in the request.

  3. Asynchronous messaging is not possible without WS-Addressing headers.

Use the following table to determine whether a request message is accepted when the client and provider both have a WS-Addressing policy configuration; the client has provider and client policies applied; and policy sharing is enabled on the server.

This is a complex table containing spanned column headings. There is a header column entitled "Client settings" which specifies whether WS-Addressing support is optional or mandatory on the client and also which messaging style is configured. The second main column shows the policy settings on the provider, with two sub-columns for whether WS-Addressing is optional or mandatory. Both of these sub-columns are further sub-divided into three sub-columns for messaging style (synchronous and asynchronous, synchronous only, or asynchronous only).

Client policy settings Provider policy settings
WS-Addressing is optional WS-Addressing is mandatory
Synchronous and asynchronous Synchronous only Asynchronous only Synchronous and asynchronous Synchronous only Asynchronous only
WS-Addressing optional and messaging style synchronous and asynchronous Message accepted Message accepted Message accepted Message accepted Message accepted Message accepted
WS-Addressing optional and messaging style synchronous only Message accepted Message accepted Message accepted1 Message accepted Message accepted Fault
WS-Addressing optional and messaging style asynchronous only2 Fault Fault Fault Message accepted Fault Message accepted
WS-Addressing mandatory and messaging style synchronous and asynchronous Message accepted Message accepted Message accepted Message accepted Message accepted Message accepted
WS-Addressing mandatory and messaging style synchronous only Message accepted Message accepted Fault Message accepted Message accepted Fault
WS-Addressing mandatory and messaging style asynchronous only Message accepted Fault Message accepted Message accepted Fault Message accepted

:

  1. The messaging style is only enforced if WS-Addressing headers are present in the request.
  2. Asynchronous messaging is not possible without WS-Addressing headers.

If the provider and client policies are not shared, the client does not send WS-Addressing headers (unless we enable WS-Addressing on the client by another method). In this situation, if the provider policy specifies that WS-Addressing is mandatory, the server generates a fault regardless of the messaging style.


Tasks

WS-Addressing properties are now included in the SOAP message header, and are processed by the server on receipt of the message.


Subtopics


Related:

  • IBM proprietary Web Services Addressing SPIs
  • Enable Web Services Addressing support for JAX-RPC applications
  • Manage policy sets
  • Configure the WS-Addressing policy
  • Attaching a policy set to a service artifact
  • Configure a service provider to share its policy configuration
  • Configure the client policy to use a service provider policy
  • Invoking JAX-WS web services asynchronously
  • Disable Web Services Addressing support