Create a WSO2 ESB API that return the request as the reponse

If you want to create a WSO2 ESB API that return the same request as the response please use the follows

<api xmlns="http://ws.apache.org/ns/synapse" name="someapi" context="/myapi">
<resource methods="POST" url-mapping="/" protocol="http">
<inSequence>
<log level="full"/>
<respond/>
</inSequence>
</resource>
</api>

Now what you have to do is send a POST request to http://localhost:8280/myapi with some xml data in the request body. It will return the same request data as the response

Show your support

Clapping shows how much you appreciated Chatura Dilan Perera’s story.