2

I have a strange problem with WSO2 ESB mediation. Product version: WSO2 ESB 4.5.1

The mediation code is look like this:

<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>

When I try to invoke this service with soapUI 4.0.1 the log mediator prints that the WSA_To property value (filled by get-property('To') function) is /services/CacheWSAPrx. This is strange and unexpected for me because the SOAP request, sended via soapUI contains another value in To header:

<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>

So, my question is: why the get-property('To') returns /services/CacheWSAPrx value, I think that it must return http://www.exampleaddr.com?

Community
  • 1
  • 1

1 Answers1

0

No. If you want to get http://www.exampleaddr.com, get-property is not the required expression. Follow http://rajikak.blogspot.com/2010/04/xpath-functions-and-properties-avilable.html . You may need something like $header/wsa:To to get what you want. When get-property is used it gets a property from MessageContext as I think.

Maninda
  • 2,086
  • 3
  • 15
  • 29