如何将wso2esb中的查询URL传递给端点

如何将wso2esb中的查询URL传递给端点,wso2,wso2esb,wso2ei,Wso2,Wso2esb,Wso2ei,我正在WSO2ESB中配置以下API: <api xmlns="http://ws.apache.org/ns/synapse" name="service" context="/service"> <resource methods="POST"> <inSequence> <call> <endpoint> <http method

我正在WSO2ESB中配置以下API:

   <api xmlns="http://ws.apache.org/ns/synapse" name="service" context="/service">
   <resource methods="POST">
      <inSequence>
         <call>
            <endpoint>
               <http method="POST" uri-template="https://webapps.localhost/service.php"/>
            </endpoint>
         </call>
         <send/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
      <faultSequence>
         <log level="full"/>
      </faultSequence>
   </resource>
</api>
从service.php文件中,我可以很好地提取POST参数

现在,如果我想让dynamic GET参数按原样传递给端点,该怎么做

curl -X POST -d "a=1&b=2" localhost:8280/service?c=3&d=4
我知道(至少我所理解的)可以使用属性中介,但这是用于查询url中的已知参数(例如,$url:c),但我不想限制它,只需按原样将查询url传递给目标端点即可

curl -X POST -d "a=1&b=2" localhost:8280/service

任何帮助都将不胜感激。

仅在此处更新,请使用Address EndPoint而不是HTTP EndPoint(基于URI模板)

通常我所做的是在端点的URI模板上定义两个变量,然后使用属性中介设置它们

差不多

<http method="POST" uri-template="https://webapps.localhost/service?c={uri.var.c}&d={uri.var.d}"

您可以通过REST\u URL\u后缀访问资源路径

<property name="path" expression="$axis2:REST_URL_POSTFIX"/>


根据您的请求URL,
$ctx:path
应该包含
?c=3&d=4

它应该是现成的。看见