This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

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 2 Next »

The following diagram depicts quad-channel JMS synchronous invocations of the WSO2 Enterprise Integrator (WSO2 EI).

 


The following example code shows configuration of WSO2 EI for quad-channel JMS synchronous invocations.

Example Code 5

<proxy name="QuadJMS" transports="jms" xmlns="http://ws.apache.org/ns/synapse">
      <target>
          <inSequence>
              <property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type" scope="axis2"/>
              <log level="full" xmlns="http://ws.apache.org/ns/synapse"/>
              <send>
                  <endpoint>
                      <address uri="jms:/BEReq?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue&amp;transport.jms.ReplyDestination=BERes"/>
                  </endpoint>
              </send>
          </inSequence>
          <outSequence>
              <send/>
          </outSequence>
      </target>
      <parameter name="transport.jms.ContentType">
          <rules>
              <jmsProperty>contentType</jmsProperty>
              <default>text/xml</default>
          </rules>
      </parameter>
      <parameter name="transport.jms.Destination">ClientReq</parameter>
</proxy>

The message flow of the sample code is as follows:

  1. JMSReplyTo property of JMS message is set to ClientRes. Therefore, the client sends a JMS message to ClientReq queue.
  2. Next, the   transport.jms.ReplyDestination value is set to BERes. This enables the WSO2 EI proxy to pick messages from ClientReq queue, and send to BEReq queue .
  3. Next, the back-end picks messages from the BEReq queue, processes and places response messages to BERes queue.
  4. Once a response is available in BERes queue, the proxy service picks it and sends back to ClientRes queue.
  5. Finally, the client picks it as the response message.
  • No labels