Wednesday, February 20, 2013

ReplyTo header in Unified Endpoint configuration of WSO2 BPS

In a BPEL process, when there is an invoke to an external synchronus web service, and if you want to send the response of this service to a different endpoint (rather than sending back to the BPEL process), you can use Unified Endpoint configuration of WSO2 BPS 3.0.0 to set the WS:Addressing ReplyTo header as follows:
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:9763/services/DebugService/</wsa:Address>
<wsa:Metadata>
<id>SInvokeEPR</id>
<qos>
<enableAddressing>
<ReplyTo>http://localhost:8281/services/OtherServiceProxy</ReplyTo>
</enableAddressing>
</qos>
</wsa:Metadata>
</wsa:EndpointReference>
view raw gistfile1.xml hosted with ❤ by GitHub
You can refer to this config file (locatd in registry or in the file system) as follows, inside the deploy.xml file:
<invoke partnerLink="DebugPL">
<service name="DebugService:DebugService" port="DebugServiceSOAP">
<endpoint xmlns="http://wso2.org/bps/bpel/endpoint/config" endpointReference="debug.epr"/>
</service>
</invoke>
view raw gistfile1.xml hosted with ❤ by GitHub
There are other use cases of UEP like adding QOS, Security etc. You can read more on that here.

No comments:

Post a Comment