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

Like what you read? Give Chatura Dilan Perera a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.