Url rewriting 在消息传输期间,WSO2 ESB将字符串附加到端点url

Url rewriting 在消息传输期间,WSO2 ESB将字符串附加到端点url,url-rewriting,wso2,wso2esb,endpoint,Url Rewriting,Wso2,Wso2esb,Endpoint,在我的用例中,我有这个代理: <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="MIOProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> &

在我的用例中,我有这个代理:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
   name="MIOProxy"
   transports="https,http"
   statistics="disable"
   trace="disable"
   startOnLoad="true">
   <target>
      <inSequence>
         <sequence name="blackListCheck"/>
         <send>
             <failover>
        <enpoint key="workerClusterTest" />
                <enpoint key="replica_test" />
              </failover>
         </send>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>
成为

url="http://localhost:8080/MyString/myservice1"

接下来有没有办法直接做到这一点?或者自定义类中介是最好的方法?

据我所知,在inSequence中无法做到这一点。您必须编写一个自定义类中介来满足您的需要。

因此,根据上述内容,您分别定义了两个端点workerClusterTest和replica_test。那么为什么不能在端点定义本身中添加所需的字符串呢?这是体系结构的一个要求。。。我的意思是这两个端点是全局的。。。虽然传入请求涉及特定服务,但其url地址如下:。。。我想知道我是否可以避免多次重复端点定义,只保留这两个定义,然后将MyString-1-2-3连接到它们不确定,但这不是你想要的吗?
url="http://localhost:8080/myservice1"
url="http://localhost:8080/MyString/myservice1"