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

Objective: Demonstrate switching from HTTP to JMS.

Prerequisites
  • Download, install and start a JMS server.
  • Configure sample Axis2 server for JMS.
  • Start the Axis2 server and deploy the SimpleStockQuoteService.
  • Configure the Synase JMS transport.
  • Start the Synapse configuration numbered 251: wso2esb-samples.sh -sn 251

To switch from HTTP to JMS, edit the samples/axis2Server/repository/conf/axis2.xml for the sample Axis2 server and enable JMS, and restart the server. Now you can see that the simple stock quote service is available in both JMS and HTTP in the sample Axis2 server. To see this, point your browser to the WSDL of the service at http://localhost:9000/services/SimpleStockQuoteService?wsdl. JMS URL for the service is mentioned as below:

You may also notice that the simple stock quote Proxy Service exposed in ESB is now available only in HTTP as we have specified transport for that service as HTTP. To observe this, access the WSDL of stock quote proxy service at http://localhost:8280/services/StockQuoteProxy?wsdl.

This ESB configuration creates a Proxy Service Samples over HTTP and forwards received messages to the above EPR using JMS, and sends back the response to the client over HTTP once the simple stock quote service responds with the stock quote reply over JMS to the ESB server. To test this, send a place order request to ESB using HTTP as follows:

The sample Axis2 server console will print a message indicating that it has accepted the order as follows:

Labels
  • None