This documentation is for WSO2 Enterprise Integrator version 6.1.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata

Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:

  • <PRODUCT_HOME>/repository/samples/ directory that includes all Integration profile samples is changed to <EI_HOME>/samples/service-bus/.
  • <PRODUCT_HOME>/repository/samples/resources/ directory that includes all artifacts related to the Integration profile samples is changed to <EI_HOME>/samples/service-bus/resources/.

Objective: Introduction to ESB Proxy Services.

<definitions xmlns="">
    <proxy name="StockQuoteProxy">
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
        <publishWSDL uri="file:samples/service-bus/resources/proxy/sample_proxy_1.wsdl"/>
  • Start the Synapse configuration numbered 150: i.e. -sn 150
  • Start the Axis2 server and deploy the SimpleStockQuoteService if not already done.

Once ESB starts, you could go to http://localhost:8280/services/StockQuoteProxy?wsdl and view the WSDL generated for the Proxy Service defined in the configuration. This WSDL is based on the source WSDL supplied in the Proxy Service definition and is updated to reflect the Proxy Service EPR.

Execute the stock quote client by requesting for a stock quote on the Proxy Service as follows:

1. Stock Quote Client

This is a simple SOAP client that could send stock quote requests, and receive and display the last sale price for a stock symbol.

The client is able to operate in the following modes, and send the payloads listed below as SOAP messages:

  • quote - sends a quote request for a single stock as follows. The response contains the last sales price for the stock which would be displayed.
<m:getQuote xmlns:m="http://services.samples/xsd">
  • customquote - sends a quote request in a custom format. The ESB would transform this custom request into the standard stock quote request format and send it to the service. Upon receipt of the response it would be transformed again to a custom response format and returned to the client, which will then display the last sales price.
<m0:checkPriceRequest xmlns:m0="http://services.samples/xsd">
  • fullquote - gets quote reports for the stock over a number of days (i.e. last 100 days of the year).
<m:getFullQuote xmlns:m="http://services.samples/xsd">
  • placeorder - places an order for stocks using a one way request
<m:placeOrder xmlns:m="http://services.samples/xsd">
  • marketactivity - gets a market activity report for the day (i.e. quotes for multiple symbols)
<m:getMarketActivity xmlns:m="http://services.samples/xsd">


See samples/axis2Client/src/samples/common/ for sample responses expected by the clients.

ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy

An inSequence or endpoint or both of these would decide how the message would be handled after the Proxy Service receives the message. In the above example the request received is forwarded to the sample service hosted on Axis2. The outSequence defines how the response is handled before it is sent back to the client. By default, a Proxy Service is exposed over all transports configured for ESB, unless these are specifically mentioned through the transports attribute.

  • No labels