Monday, November 17, 2014

OSB Asynchronus service call with updating the callback header

OSB is constructed as client to consume the Asyncronus service. Lets consider we already build the Oracle SOA Asynchronous composite.

Lets create proxy service to consume the asyncronus service.

Flow 1:    Proxy 1 -> Business 1 -> SOA Asynchronous Composite 1

Create a proxy service and business service. Business service just consumes SOA Asynchronous composite.

Flow 2: SOA Asynchronous Composite 1 -> Proxy 2 -> Business service 2

Now we need to create a new proxy and business service, such that SOA can callback to this OSB service.

But how does SOA composite know the endpoint url of Proxy 2?!

Hence we need to pass the callback proxy service( proxy 2) endpoint url in the the header of proxy 1 before invoking the business service 1 as below.

 In this proxy service while routing to the business service add an assign activity to reply to appropriate client service.

<soap-env:Header xmlns:ns1="http://schemas.xmlsoap.org/ws/2003/03/addressing">
        <ns1:MessageID>ws:uniqueAddress</ns1:MessageID>
        <ns1:ReplyTo>
        <ns1:Address>http://localhost:8011/CallAsyncService/proxyServices/CallSyncCompositeProxy</ns1:Address>
         </ns1:ReplyTo>
 </soap-env:Header>


No comments:

Post a Comment