...
- Configure WSO2 ESB with Apache ActiveMQ and set up the JMS listener. For instructions, see Configure with ActiveMQ.
Start
the ApacheActiveMQ
server by executing the following command:by navigating to
<ACTIVEMQ_HOME/bin>
folder and executing./activemq console
(on Linux/OSX) oractivemq start
(on Windows).Start
the WSO2ESB
server by executing the following command:by navigating to
<ESB_HOME/bin>
folder and executing./wso2server.sh
(on Linux/OSX) orwso2server.bat
(on Windows).Create a proxy service with the following configuration.To create a proxy service using ESB Tooling, see Working with Proxy Services via ESB Tooling.
Code Block language xml <proxy xmlns="http://ws.apache.org/ns/synapse" name="JMStoHTTPStockQuoteProxy" transports="jms"> <target> <inSequence> <property action="set" name="OUT_ONLY" value="true"/> </inSequence> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> <outSequence> <send/> </outSequence> </target> </proxy>
- To test this you will need an HTTP back-end service. Deploy the SimpleStockQuoteService and start the Axis2 server.
Place a message into the Apache ActiveMQ queue by executing the following command from
<ESB_HOME>/samples/axis2Client
folder.Code Block language xml ant stockquote -Dmode=placeorder -Dtrpurl="jms:/JMStoHTTPStockQuoteProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.ContentTypeProperty=Content-Type&transport.jms.DestinationType=queue"
...