WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results
             New or updated topic for this feature pack

Building a reliable Web service application

Develop a Java API for XML-Based Web Services (JAX-WS) provider or requester application, and configure a policy set to enable WS-ReliableMessaging. Install your application then attach the policy set. If you want to use either of the managed qualities of service, bind the application or policy set to a service integration bus and messaging engine.

About this task

To configure a Web service application to use WS-ReliableMessaging, you attach a policy set that contains a WS-ReliableMessaging policy type. This policy type offers a range of qualities of service: managed persistent, managed non-persistent, or unmanaged non-persistent. The managed qualities of service, managed persistent and managed non-persistent, are supported by the service integration bus.For each attachment between an application and a policy set, you can select the bus and messaging engine to use for the reliable messaging protocol state.

To enable WS-ReliableMessaging for an application, you take the following broad actions:
  1. Develop a Java API for XML-Based Web Services (JAX-WS) Web service provider or requester application.
  2. Install the application into WebSphere Application Server.
  3. Attach a reliable messaging policy set (either a default policy set or one that you have created) to an aspect of your application (that is, application level or service level). Policy sets define the reliability level (quality of service) and other configuration options that you want to apply to your reliable messaging application.
  4. Define the bindings for each attachment to a policy set that specifies a managed quality of service. That is, choose the service integration bus and messaging engine to use to maintain the state for the managed persistent and managed non-persistent qualities of service.
To build a reliable Web service application, complete the following steps:

Procedure

  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. For more information, 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, as described in Example: Code for waiting for a sequence to complete. This is good practice for any reliable messaging client application, and is essential for an unmanaged client application that is designed to exit after requests are made, as explained in the following troubleshooting tip: WS-ReliableMessaging troubleshooting tips.
    5. (Optional) If you want to use in-order delivery (that is, you want WS-ReliableMessaging to make messages available to your requester application in the order that they were sent), then you must also configure your requester application to poll for the messages in the order in which it wants to receive them. For more information, see Configuring 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.

    Your client application can also 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. You can add code to create sequences, send acknowledgement requests, close sequences, terminate sequences and wait until sequences are complete. For more information, including example code, see Controlling WS-ReliableMessaging sequences programmatically.

  2. Configure a policy set instance to enable WS-ReliableMessaging.
  3. Install your reliable JAX-WS Web service application.
  4. Attach and bind a WS-ReliableMessaging policy set to your application.
  5. Save your changes to the master configuration.
  6. Stop then restart the server.

Results

A reliable JAX-WS application is deployed into a suitably configured environment and started.



In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/twbs_wsrm_build_app.html