在 WSO2 APIM 中读取动态查询参数 [英] Reading Dynamic query parameter in WSO2 APIM

查看:33
本文介绍了在 WSO2 APIM 中读取动态查询参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 wso2 APIM 1.8 进行休息到肥皂的转换.我的 GET 其余资源在发布者中定义如下

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

/add?*

因此它将具有任意数量的查询参数,例如 /add?a=1&b=3/add?a=1&b=2&c=3

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

我的要求是我想按顺序读取这些动态(某些参数是可选的)值(a,b,c 等),并在有效载荷工厂中介器中使用该值来创建肥皂有效载荷.它是如何可以读取这些值吗?

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?

推荐答案

经过 ESB doc1 发现可以使用 $url突触 xpath 变量.

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

这篇关于在 WSO2 APIM 中读取动态查询参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆