Skip to content

Switching from JMS to HTTP(S)

This example demonstrates how the Micro Integrator receives a messages over the JMS transport and forwards it over an HTTP/S transport. In this sample, the client sends a request message to the proxy service exposed in JMS. The Micro Integrator forwards this message to the HTTP endpoint and returns the reply back to the client through a JMS temporary queue.

Synapse configuration

Following are the integration artifacts (proxy service) that we can used to implement this scenario. See the instructions on how to build and run this example.

<proxy xmlns="" name="JMStoHTTPStockQuoteProxy" transports="jms">
              <property action="set" name="OUT_ONLY" value="true"/>
                      <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
      <parameter name="transport.jms.ContentType">
      <parameter name="transport.jms.Destination">Queue1</parameter>
      <parameter name="transport.jms.ConnectionFactory">myQueueListener</parameter>

Build and Run

Create the artifacts:

  1. Set up WSO2 Integration Studio.
  2. Create an ESB Solution project.
  3. Create the proxy service with the configurations given above.
  4. Deploy the artifacts in your Micro Integrator.
  5. Start the selected message broker and create a queue with name Queue1.
  6. Configure MI with the selected message broker and start the Micro-Integrator.

Set up the back-end service:

  1. Download the stockquote_service.jar
  2. Open a terminal, navigate to the location of the downloaded service, and run it (stock quote service) using the following command:

    java -jar stockquote_service.jar

Publish the following XML message to the Queue1.

<soapenv:Envelope xmlns:soapenv="">
    <m0:placeOrder xmlns:m0="http://services.samples">