Forwarding a SOAP message from WSO2ESB via another ESB to a backend web-service does not seem possible, because the original wsa:To
value is modified to the URL of the intermediate ESB.
The following configuration shows this behavior:
<header name="To" value="http://ws.backend.com/service"/>
<property name="PRESERVE_WS_ADDRESSING" value="true"/>
<send>
<endpoint name="IntermediateESB">
<address uri="http://esb.intermediate.com/proxy">
<enableAddressing/>
</address>
</endpoint>
</send>
The SOAP header now contains the following wsa:To
:
<wsa:To>http://esb.intermediate.com/proxy</wsa:To>
The address uri
seems to overwrite the original wsa:To
value.
This will fail in the intermediate ESB, because it expects the URL of the backend web-service in wsa:To
.
The SOAP header should have contained the following for the intermediate ESB to work properly:
<wsa:To>http://ws.backend.com/service</wsa:To>
What configuration is possible to fix this?
You need to provide your backend address in wsa:ReplyTo header tag. So your intermediate will proceed the response to backend service.
More info : http://www.w3.org/Submission/ws-addressing/