在 WSO2 ESB5.0.0 REST_URL_POSTFIX 中,该值未附加到端点 url

In WSO2 ESB5.0.0 REST_URL_POSTFIX the value is not appending to the endpoint url

我试图通过使用 REST_URL_POSTFIX 属性 将 属性 中介中定义的 属性 附加到 HTTP 端点 url 但它不是正在工作。

<?xml version="1.0" encoding="UTF-8"?>
<api context="/synapse" name="synapse" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" uri-template="/2">
    <inSequence>
            <property name="REST_URL_POSTFIX" scope="axis2" type="STRING" value="hello/mkyongdemo"/>
            <log level="custom">
                <property expression="$ctx:REST_URL_POSTFIX" name="category"/>
            </log>
            <property name="HTTP_METHOD" scope="axis2" type="STRING" value="GET"/>
            <send>
                <endpoint>
                    <http method="get" uri-template="http://192.168.1.35:9768/RESTfulExample/rest"/>
                </endpoint>
            </send>
        </inSequence>
</resource>
</api>

您需要使用 "pox" 格式的地址端点。

<api xmlns="http://ws.apache.org/ns/synapse" name="synapse" context="/synapse">
   <resource methods="GET" uri-template="/2">
      <inSequence>
         <property name="REST_URL_POSTFIX" value="hello/mkyongdemo" scope="axis2" type="STRING"/>
         <log level="custom">
            <property name="category" expression="$axis2:REST_URL_POSTFIX"/>
         </log>
         <property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/>
         <send>
            <endpoint>
               <address uri="http://localhost:8280/RESTfulExample/rest" format="pox"/>
            </endpoint>
         </send>
      </inSequence>
   </resource>
</api>