WSO2 ESB 4.8.1。动态HTTP端点模板不工作
我正在使用WSO2 ESB 4.8.1。我正在给后端服务打一个休息电话。为此,我使用HTTP端点模板来创建动态端点。我从URL中选取值并将其传递给端点 序列代码:WSO2 ESB 4.8.1。动态HTTP端点模板不工作,wso2,wso2esb,wso2carbon,Wso2,Wso2esb,Wso2carbon,我正在使用WSO2 ESB 4.8.1。我正在给后端服务打一个休息电话。为此,我使用HTTP端点模板来创建动态端点。我从URL中选取值并将其传递给端点 序列代码: <sequence xmlns="http://ws.apache.org/ns/synapse" name="SampleSequence"> <property xmlns:ns="http://org.apache.synapse/xsd" name="uri.var.myProperty" expres
<sequence xmlns="http://ws.apache.org/ns/synapse" name="SampleSequence">
<property xmlns:ns="http://org.apache.synapse/xsd" name="uri.var.myProperty" expression="get-property('uri.var.identityCode')" scope="default" type="STRING"></property>
<send>
<endpoint>
<http method="get" uri-template="http://com.example?identityCode={uri.var.myProperty}"></http>
</endpoint>
</send>
</sequence>
问题:
该值正在正确地传递到属性中。但终点并没有把它捡起来。这是正确的方法吗?使用REST\u URL\u后缀[1]创建查询字符串,如下所示
<property name="val1" expression="get-property('uri.var.identityCode')"/>
<property name="REST_URL_POSTFIX" expression="fn:concat('?identityCode=',$ctx:val1)" scope="axis2"/>
<send>
<endpoint>
<http method="get" uri-template="http://com.example"></http>
</endpoint>
</send>
您链接到的文档明确指出,在HTTP端点的情况下不要这样做,而是按照原始问题中的@omerkhalid所要求的那样做。据我所知,REST\uURL\uPostfix仅适用于“地址”端点。嗨,通过使用“uri.var.”和“POST\u TO\uURI”属性,我们可以为HTTP端点实现这一点。你能看看下面吗?