...
Prefix used to get a SOAP 1.1 or 1.2 envelope level element. For example, to get the body element from the SOAP envelope, use the expression $env/*[local-name()='Body'].
Example of $url $env usage:
Create an API with the following configuration. For information on how to create an API, see Creating APIs.
Code Block language xml <api context="/soapEnvelopeTest" name="SoapEnvelopeTest"> <resource url-mapping="/*"> <inSequence> <loopback/> </inSequence> <outSequence> <property name="messageType" scope="axis2" value="application/xml"/> <payloadFactory media-type="xml"> <format> <theData xmlns="http://some.namespace"> <item>$1</item> </theData> </format> <args> <arg evaluator="xml" expression="$env/*[local-name()='Body']/*[local-name()='jsonObject']/*"/> </payloadFactory> <property name="messageType" scope="axis2" value="application/json"/> <send/> </outSequence> </resource> </api>
Send a post request to the API you created (i.e.,http://localhost:8280/soapEnvelopeTest) with the following json payload.
Code Block language xml {"content":{ "paramA": "ValueA", "paramB": "valueB" }}
You will see the following on the ESB log:
Code Block language xml {"theData":{"item":{"content":{"paramA":"ValueA","paramB":"valueB"}}}}
...