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 wso2esb-samples.sh -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 "axis2server.sh"
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="http://ws.apache.org/ns/synapse">
    <proxy name="StockQuoteProxy">
        <target>
            <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
            <outSequence>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
</definitions>




Monitoring with tcpmon


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


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!

    http://stackoverflow.com/questions/10929025/url-rewrite-mediator-wso2-esb

    ReplyDelete