Enable Web Services Addressing support for JAX-WS applications using policy sets
For JAX-WS applications, we can enable WS-Addressing support after we deploy an application to the server, by creating or modifying policy sets, and attaching those policy sets to either a service or client application.
We can also configure the WS-Addressing support using other methods, for example in the code of the application, however this method overrides all other methods. Note that WS-Addressing support is enabled by default for service providers.
Tasks
- Ensure that we have a policy set containing the WS-Addressing policy type. If we have to create a new policy set, or add the WS-Addressing policy to an existing policy set, refer to Manage policy sets for instructions.
- Configure the WS-Addressing policy type according to the instructions in Configure the WS-Addressing policy. Use the two settings to specify whether WS-Addressing is mandatory, and whether to use a synchronous or asynchronous message exchange pattern. The default settings are that WS-Addressing is not mandatory, and that both synchronous and asynchronous messaging patterns are used.
- Attach the policy set to a web service provider or client artifact, according to the instructions in Attaching a policy set to a service artifact.
- Optional: To communicate the WS-Addressing policy settings to other servers and clients, configure policy sharing as described in Configure a service provider to share its policy configuration or Configure the client policy to use a service provider policy. If policy sharing is enabled and the server and client cannot agree a policy, normal WS-Policy behavior applies (a policy error is produced).
WS-Addressing properties are now included in the SOAP message header, and are processed by the server on receipt of the message.
Subtopics
- Create policy sets
Use the administrative console to either create a policy set by specifying all the necessary information or by copying an existing policy set that you rename. Use policy sets, or assertions that define services, to simplify the web services configuration because policy sets group security and other web services settings into reusable units.- Configure the WS-Addressing policy
When working with policy sets in the administrative console, we can add and configure policies to enable standard addressing of web services.- Attaching a policy set to a service artifact
Attach a policy set to a service artifact, such as an application, service, endpoint or operation, to define the quality of services supported. Policy sets can define the policies for WS-Addressing, WS-Security, WS-ReliableMessaging, WS-Transaction, HTTP transport, Java Messaging Service (JMS) transport, and SSL transport.- Configure a service provider to share its policy configuration
A WAS service provider can share its policy configuration in published Web Services Description Language (WSDL), or WSDL that is obtained using an HTTP GET request or the Web Services Metadata Exchange (WS-MetadataExchange) GetMetadata request.- Configure the client policy to use a service provider policy
An application that is a web service client can obtain the policy configuration of a web service provider and use this information to establish a policy configuration that is acceptable to both the client and the service provider.
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