All docs This doc
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 3 Next »

The objective of the sample is to introduce Message Translator Enterprise Integration Pattern (EIP) can be implemented using WSO2 ESB.  Translator will basically change the context of a message from one interface to the other so that the message passed will adhere to the message context rules of the back end service.  

  • Start the Synapse configuration numbered 0: for example, wso2esb-samples -sn 1007.
  • Start two instances of the Axis2 server and deploy the SimpleStockQuoteService if not already deployed.

Request Structure

The following describes a sample structure of a request which will be sent to the ESB from the client end. The client sends a HTTP REST call in the the following manner

curl -v

The message passed can be viewed from TCPMon and it will be smiler to the following structure

GET /stockquote/view/IBM HTTP/1.1 
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/ libidn/1.23 librtmp/2.3 
Accept: */* 
<!-- Message Translator-->
<definitions xmlns="">
   <api name="MessageTranslate" context="/stockquote">
        <resource uri-template="/view/{symbol}" methods="GET">
            <m0:getQuote xmlns:m0="http://services.samples">
            <arg expression="get-property('uri.var.symbol')"/>
               <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/>











  • No labels