我对 WSO2 ESB 中介有一个奇怪的问题。产品版本:WSO2 ESB 4.5.1
中介代码如下所示:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="CacheWSAPrx" transports="https,http" statistics="disable" trace="enable" startOnLoad="true">
<target>
<inSequence>
<log level="full">
<property xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" name="WSA_To" expression="get-property('To')"/>
</log>
<send>
<endpoint>
<address uri="http://localhost:9083/TestCacheWeb/sca/MaketWSSoapExport1"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send>
<endpoint>
<default/>
</endpoint>
</send>
</outSequence>
</target>
<publishWSDL key="conf:/repository/wsdl/service.wsdl"/>
<description></description>
</proxy>
当我尝试使用soapUI 4.0.1 调用此服务时,日志调解器打印出 WSA_To 属性值(由 get-property('To') 函数填充)是/services/CacheWSAPrx。这对我来说很奇怪和意外,因为通过 soapUI 发送的 SOAP 请求在To标头中包含另一个值:
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://eisgkh.ru/maket/ws/Maket.WS2.Service.Action</wsa:Action><wsa:To>http://www.exampleaddr.com</wsa:To></soapenv:Header>
所以,我的问题是:为什么 get-property('To') 返回/services/CacheWSAPrx值,我认为它必须返回http://www.exampleaddr.com?