This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.
Skip to end of metadata
Go to start of metadata


Reliable Message only works with Nhttp configuration.

Objective: Demonstrate the message exchange between ESB and the server using WS-ReliableMessaging 1.1 Specification (WS-RM).This sample is similar to sample 101 except it uses the RM 1.1 for the communication.

<definitions xmlns="">
        <RMSequence single="true" version="1.1"/>
            <endpoint name="reliable">
    		<address uri="http://localhost:9000/services/ReliableStockQuoteService">
        <header name="wsrm:SequenceAcknowledgement" action="remove"
        <header name="wsrm:Sequence" action="remove"
        <header name="wsrm:AckRequested" action="remove"


  • Deploy the ReliableStockQuoteService in the sample Axis2 server by switching to the samples/axis2Server/src/ReliableStockQuoteService directory and running ant.
  • Start the sample Axis2 server on port 9000.
  • Start ESB with the sample configuration 102 (i.e. wso2esb-samples -sn 102).

In the above configuration, WS-RM is engaged to the endpoint using the <enableRM/> tag. It is possible to engage WS-RM to both Address and WSDL endpoints using this tag. In addition to the RM enabled endpoint, RMSequence mediator is specified before the send mediator. This mediator is used to specify the set of messages to be sent using a single RM sequence. Also it specifies the RM version. In this sample it is specified as single message per sequence. It also specifies the version of the WS-RM to be used. RM related SOAP headers are removed from the message in the out mediator as WS-RM message exchange happens only between the ESB and the server. Now run the sample client using the following command.

ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280

You can observe the client output displaying the quote price for IBM as follows:

[java] Standard :: Stock price = $189.2521262517493

You can observer the set of messages exchnaged between ESB and back end service using a tool like TCPMon.

  • No labels