Question

How to read body param or query param in wso2 ESB 4.8 or 4.81.We tried with following format,

<property name="uri.var.name" expression="$url:name"></property>

<property name="uri.var.name" expression="$body/name"></property>

It succeeded with 4.7,But not working in WSO2 ESB 4.8 and 4.8.1 ..Any suggestion ?

Was it helpful?

Solution

To read request params :

Sample request : http://localhost:8280/services/MyService?param1=val1&param2=val2

<property name="PARAM1" expression="tokenize(substring-after(syn:get-property('To'),'param1='),'&')"/>

<property name="PARAM1" expression="tokenize(substring-after(syn:get-property('To'),'param2='),'&')"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top