This documentation is for WSO2 ESB version 4.5.0. View documentation for the latest release.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Objective: To demonstrate one way messaging / fireAndForget through ESB.

Prerequisites
  • Start the Axis2 server and deploy the SimpleStockQuoteService (Refer steps above).
  • Start the Synapse configuration numbered 1: wso2esb-samples -sn 1

This example invokes the one-way placeOrder operation on the SimpleStockQuoteService using the custom client which uses the Axis2 ServiceClient.fireAndForget() API. To test this, use ant -Dmode=placeorder... and you will notice the one way message flowing through ESB into the sample Axis2 server instance, which reports the acceptance of the order as follows:

ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=placeorder
SimpleStockQuoteService :: Accepted order for : 7482 stocks of IBM at $ 169.27205579038733

If you send your client request through TCPmon, you will notice that the SimpleStockQuoteService replies to ESB with a HTTP 202 reply and that ESB in-turn replies to the client with a HTTP 202 acknowledgement.

  • No labels