+

Search Tips   |   Advanced Search

Develop a reliable Web service application


Develop a JAX-WS provider or requester application that can compose with a WS-ReliableMessaging-enabled policy set.

At any stage - that is, before or after we have built the reliable Web service application, or configured the policy sets - we can set a property that configures endpoints to only support clients that use reliable messaging. This setting is reflected by WS-Policy if engaged.

We can develop a JAX-WS Web service requester application that sends messages reliably, or a Web service provider application that requires reliable messaging. Your client application can also take programmatic control of WS-ReliableMessaging sequences.

 

  1. Develop your JAX-WS Web service application. For a Web service requester application that sends messages reliably:

    1. Get an implementation WSDL document, and select the SOAP over HTTP binding. The WSDL should be WS-I Basic Profile compliant.

    2. Build the JAX-WS application from the WSDL implementation document.

    3. (Optional) Enable transaction support for outbound (requester) one-way message sends.

      See Providing transactional recoverable messaging through WS-ReliableMessaging.

    4. (Optional) Use the waitUntilSequenceCompleted method on the sequenceManager to ensure that reliable messaging state is released after the client finishes messaging,

    5. (Optional) To use in-order delivery (that is, you want WS-ReliableMessaging to make messages available to the requester application in the order that they were sent), then also configure the requester application to poll for the messages in the order in which it wants to receive them.

      See Set the WS-ReliableMessaging policy.

    For a Web service provider application that requires reliable messaging:

    1. Write or get an interface WSDL document that describes the service interface. The document should be compliant with the WS-I Basic Profile.

    2. Write or get an implementation WSDL document, and select the SOAP over HTTP binding. The WSDL should remain WS-I Basic Profile compliant.

    3. Build the JAX-WS application from the WSDL implementation document.

  2. Enable the client application to take programmatic control of WS-ReliableMessaging sequences.

    This helps manage resources on the server, for example by removing sequences after a client application has finished messaging. We can add code to create sequences, send acknowledgement requests, close sequences, terminate sequences and wait until sequences are complete.

    See, including example code, see Controlling WS-ReliableMessaging sequences programmatically.

 

Next steps

we are now ready to configure a policy set instance to enable WS-ReliableMessaging.


Controlling WS-ReliableMessaging sequences programmatically
Providing transactional recoverable messaging through WS-ReliableMessaging

 

Related concepts


JAX-WS application deployment model

 

Related tasks


Learn about WS-ReliableMessaging
Set endpoints to only support clients that use WS-ReliableMessaging
Detecting and fixing problems with WS-ReliableMessaging
Building a reliable Web service application

 

Related


WS-ReliableMessaging - requirements for interaction with other implementations