Sample 440: Respond Mediator - Echo Service with a Proxy Service

<definitions xmlns=""> <proxy name="EchoService"> <target> <inSequence> <respond/> </inSequence> </target> </proxy> </definitions>


Demonstrate how to use respond mediator to create a simple echo service


  • Start Synapse using the configuration numbered 440 (repository/conf/sample/synapse_sample_440.xml)
    Unix/Linux: sh -sample 440
    Windows: synapse.bat -sample 440

Executing the Client

Invoke the EchoService proxy service with a payload. Following is how we can use curl as the client.

curl -v -X POST -H "Content-type: application/xml" -d '<test>foo</test>' 'http://localhost:8280/services/EchoService'

Back to Catalog