Domanda

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.

È stato utile?

Soluzione

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" /> 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top