Sunday, May 6, 2012

Proxy Services with WSO2 ESB / Monitoring with TCPMon

The sample 150 of WSO2 ESB is dedicated to proxy services.

Download ESB from here.
Start the ESB with sample 150 -sn 150
Start the Axis2 server and deploy the SimpleStockQuoteService
Go to wso2esb-4.0.3/samples/axis2Server/src/SimpleStockQuoteService and type the command 
ant to build.
The go to wso2esb-4.0.3/samples/axis2Server$ and start the axis Server ""
Execute the stock quote client
Go to ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy and type the following 
ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy

Following is the configuration for sample 150

<definitions xmlns="">
    <proxy name="StockQuoteProxy">
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
        <publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>

Monitoring with tcpmon

First start the tcpmon of WSO2 ESB. Go to wso2esb-4.0.3/bin$ and type ./ 

Click Add and go to port 8281 tab

tcpmon is ready to capture traffic between client and WSO2 ESB.

When sending the request to WSO2 ESB send it to port 8281 instead of 8280.

eg: ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy should be replaced by the following
ant stockquote -Daddurl=http://localhost:8281/services/StockQuoteProxy

That's how tcpmon is used to monitor. More details available in following links.

1 comment:

  1. Hey can you please answer the question.Thanx in advance!