Versions Compared

Key

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

...

Gliffy
nameMessage-Router-Diagram
pagePin6

Setting up the environment

Download the Message-Router_1.0.0.zip file, which includes the artifacts of this sample and follow the steps in  Setting up the Environment, to set up the environment.

Note

You need to start two instances of the Axis2 server to run in ports 9000 and 9001 by executing the following commands:

  • ./axis2server.sh -http  9000 -https  9002 -name MyServer1
  • ./axis2server.sh -http  9001 -https  9003 -name MyServer2

Executing the sample

In the Terminal, navigate to the <EI_HOME>/samples/axis2Client/ directory, and execute the following command to send a request using the Stock Quote Client to the ESB profile: 

ant stockquote -Dtrpurl=http://localhost:8280/services/message-router-proxy -Dsymbol=foo

Info

For information on the Stock Quote Client and its operation modes, go to Stock Quote Client in the WSO2 EI Documentation.

The structure of the request is as follows:

Code Block
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd">
   <soapenv:Header>    
   </soapenv:Header> 
   <soapenv:Body>
        <ser:getQuote>         
         <ser:request>
             <ser:symbol>foo</ser:symbol>
         </ser:request>       
      </ser:getQuote>
   </soapenv:Body>
</soapenv:Envelope>

...

Analyzing the output

After you execute the above command through the client, observe that the request is transferred to foo inventory service. Notice the following processed server log in the Stock Quote Client console: 

...