Question

Does anybody know way to receive original request payload (received via HTTP POST), in WSO2 proxies? When i try to access $body variable - it's empty.

Was it helpful?

Solution

You can receive HTTP POST parameters via configuring right message builder. By default you can find this in axis2.xml file:

<messageBuilder class="org.apache.axis2.builder.XFormURLEncodedBuilder"
    contentType="application/x-www-form-urlencoded"/>

Replace that builder with this one and your parameters will appear in message body:

<messageBuilder class="org.apache.synapse.commons.builders.XFormURLEncodedBuilder"
    contentType="application/x-www-form-urlencoded" /> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top