This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Objective: Using custom sequences and endpoints for message mediation with Proxy Services.

Code Block
<definitions xmlns="">
    <sequence name="proxy_1">
            <endpoint><address uri="http://localhost:9000/services/SimpleStockQuoteService"/></endpoint>
    <sequence name="out">
    <endpoint name="proxy_2_endpoint">
        <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
    <localEntry key="proxy_wsdl" src="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
    <proxy name="StockQuoteProxy1">
        <publishWSDL key="proxy_wsdl"/>
        <target inSequence="proxy_1" outSequence="out"/>
    <proxy name="StockQuoteProxy2">
        <publishWSDL key="proxy_wsdl"/>
        <target endpoint="proxy_2_endpoint" outSequence="out"/>
  • Start the Synapse configuration numbered 151: i.e. -sn 151
  • Start the Axis2 server and deploy the SimpleStockQuoteService if not already done.

This configuration creates two Proxy Services. The first Proxy Service "StockQuoteProxy1" uses the sequence named "proxy_1" to process incoming messages and the sequence named "out" to process outgoing responses. The second Proxy Service "StockQuoteProxy2" is set to directly forward messages that are received to the endpoint named "proxy_2_endpoint" without any mediation.

You could send a stock quote request to each of these Proxy Services and receive the reply generated by the actual service hosted on the Axis2 instance.

Code Block
ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy1
ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy2


Examples connected with proxy services.