Example: Code for sending an acknowledgement request

Your client application can use the WSRMSequenceManager, part of the WebSphere Application Server SPI for reliable messaging, to gain programmatic control over reliable messaging sequences. Use these code fragments as guidance for coding your reliable messaging client application to send an acknowledgement request.

Before you begin

The WebSphere Application Server SPI for reliable messaging always uses the static policy set configuration that is applied to the client from which the SPI is called. It does not use any alternative policy set that is subsequently configured by WS-Policy to meet the requirements of a WS-Policy intersection.

For your client application to gain programmatic control over reliable messaging sequences, it needs access to a WSRMSequenceManager instance. For information and example code explaining how to achieve this, see Controlling WS-ReliableMessaging sequences programmatically.

For a more complete specification of sending an acknowledgement request, see the WS-ReliableMessaging: supported specifications and standards.

Example

To send an acknowledgement request for a WS-ReliableMessaging sequence, use the following method on the WSRMSequenceManager:

  /**
   * Sending an acknowledgement request sends the ACK requested message to the specified target endPointUri.
   * The target will respond with a range of messages that can be acknowledged for the current reliable messaging 
   * sequence.
   * 
   * @param clientObject The JAX-WS Dispatch instance, or the Dynamic Proxy client instance. 
   * @param portQName
   * @param endPointUri The target endpoint uri
   * @throws WSRMNotEnabledException 
   * @throws WSRMSequenceUnknownException 
   * @throws WSRMSequenceTerminatedException 
   * @throws WSRMSequenceClosedException 
   */
  public void sendAcknowledgementRequest(Object clientObject, QName portQName, String endPointUri) 
  
  throws WSRMNotEnabledException, 
         WSRMSequenceUnknownException, 
         WSRMSequenceTerminatedException, 
         WSRMSequenceClosedException;




Related tasks
Learning about WS-ReliableMessaging
Controlling WS-ReliableMessaging sequences programmatically
Related reference
Example: Code for creating a sequence
Example: Code for closing a sequence
Example: Code for terminating a sequence
Example: Code for waiting for a sequence to complete
Reference topic    

Terms of Use | Feedback

Last updated: Oct 21, 2010 10:04:34 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=rwbs_wsrm_prog_seq_ack
File name: rwbs_wsrm_prog_seq_ack.html