Saturday, March 7, 2015

Fundamentals OSB

Asynchronous service in OSB : 

We need to define below in Route node where we want to receive callback
  • Edit Route node
  • Add assign activity to request flow
  • Inside assign replace soap header to below one : 
<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/Call
SyncCompositeProxy</ns1:Address>
</ns1:ReplyTo>

</soap-env:Header>

and its done !!


Synchronous service in OSB : 

We can invoke synchronous web service from OSB in two ways..
  • Simple OSB invocation over HTTP or 
  • if we are specific to SOA, then we can use SOA Direct 

For SOA Direct, we have need to have SOA direct binding and to get the SOA direct binding we have Direct Binding Component in Component palette in BPEL after that just use create the Biz service using the same sync wsdl and later create proxy using the same biz.

and its done !!


Error Handling in OSB : 

  • First create error handler and inside error handler, create stage.  Create Publish activity in stage to call some service.
  • Then add replace activity and choose from fault message whatever u want to pass to service selected in publish activity. 
  • Then add Assign activity: fault message to body var of biz service. Also add reply activity after publish
and its done !!