如何将查询参数作为abc=123&dfc=34发送到WSO2中的后端服务?


resource-methods="POST GET OPTIONS DELETE PUT"uri template="/{pattern}/data/{scope}/roles.json*">inSequence>property name="uri.var.pattern"expression="get property('uri.var_pattern'("/>property name="uri.var.scope"expression="get property('uri.var.secope'("/>property name="startIndex"expression="$ctx:query.param.abc"/>property name="count"expression="$ctx:query.param.dfc"/>property name="uri.var.counting"expression="fn:concat('abc=',$ctx:query.param.abc,'dfc=',$ctx:query.parm.dfc("/>filter source="$ctx:AM_KEY_TYPE"regex="PRODUCTION">那么>发送>endpoint name="admin--optional_APIproductionEndpoint_0">http method="GET"uri template="http://localhost:8080/ExistingService/{uri.var.pattern}/data/{uri.var.scope}/roles.json?{uri.var.counting}">超时>持续时间>30000responseAction>故障/超时>suspendOnFailure>errorCodes>-1initialDuration>0级数系数>1.0最大持续时间>0/suspendOnFailure>markForSuspension>errorCodes>-1/markForSuspension>/http>/端点>/发送>/那么>其他>sequence key="_sandbox_key_error_"/>/其他>/过滤器>/inSequence>outSequence>发送/>/outSequence>/资源>
<send>
  <endpoint>
    <http method="GET" uri-template="http://localhost:8081/ExistingService/{uri.var.pattern}/data/{uri.var.scope}/roles.json?abc={query.param.abc}&amp;dfc={query.param.dfc}"/>
  </endpoint>
</send>

或者,您可以动态地编写自己的http请求:

<property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/>
<header name="To" expression="xxx"/>
<send/>

(使用<filter xpath="boolean(get-property('YYY'))">验证属性是否存在(

最新更新