Jenananthan
Jenananthan

Reputation: 1401

Reading Dynamic query parameter in WSO2 APIM

I am using wso2 APIM 1.8 for rest to soap conversion. My rest resource for GET is defined as follow in publisher

/add?*

so it will have any number of query parameters e.g /add?a=1& b=3 or /add?a=1&b=2&c=3

what my requirement is I want to read these dynamic(some parameters are optional) values(a,b,c etc) in the extended in sequence and used that value in payload factory mediator to create the soap payload.How it is possible to read these values?

Upvotes: 0

Views: 1100

Answers (1)

Jenananthan
Jenananthan

Reputation: 1401

After going through the ESB doc1 found that this can be done using $url synapse xpath variable.

<log level="custom">          
            <property name="SYMBOL" expression="$url:a"></property>
            <property name="SYMBOL2" expression="$url:c"></property>
</log>
  1. https://docs.wso2.com/display/ESB481/Synapse+XPath+Variables#SynapseXPathVariables-$url

Upvotes: 1

Related Questions