Reading Dynamic query parameter in WSO2 APIM

梦想的初衷 提交于 2019-12-13 07:16:06

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/28824101/reading-dynamic-query-parameter-in-wso2-apim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!