Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagehtml/xml
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="Proxy1"
       transports="jms"
       startOnLoad="true"
       trace="disable">
   <description/>
   <target> 
      <inSequence>
         <send>
            <endpoint>
               <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
         </send>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <parameter name="transport.jms.ContentType">
      <rules>
         <jmsProperty>contentType</jmsProperty>
         <default>text/xml</default>
      </rules>
   </parameter>
</proxy>
Tip

Note that for two-way JMS scenarios the OUT_ONLY property is not used.

Use the following command from <ESB_HOME>/samples/axis2Client folder. Note how the transport.jms.ReplyDestination element is specified.

Code Block
languagexml
ant stockquote -Dsymbol=WSO2 -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&transport.jms.ReplyDestination=ResponseQueue" 

You can view the responses from the back-end service in ResponseQueue by accessing the ActiveMQ management console using the URL http://0.0.0.0:8161/admin and using admin as both the username and password.

 

...