WSO2 ESB append full body to a POST parameter
When you have to invoke a back end service which can take only on parameter and you need to send your full soap envelop body as single post parameter you can use script mediator and payload factory mediator as following. I have an api which calls to "http://localhost:9000/services/SimpleStockQuoteService" and response is received by the "second_sequence". In the second_sequence response is processed and assign it single parameter using script mediator and payload factory. API <api xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteAPI2" context="/stockquote_api"> <resource methods="GET" uri-template="/view/{symbol}"> <inSequence> <payloadFactory> <format> <m0:getQuote xmlns:m0="http://services.samples"> ...