In this post, I will show you how to do error handling in
Oracle Service Bus. To show this we have prepared a use case, in this use case
we call SOA web service from Oracle Service Bus. But we shut down the SOA
service to generate the error so when Oracle Service Bus try to call SOA
service it will get error out and we will handle that fault in Oracle
Service Bus. In the Oracle Service Bus error handling once we receive the fault
message, we will send that fault message to JMS queue.

To send message to JMS queue, we will use re-use the
business service that we created in previous post.

Once you add route error handler, right-click to add the
stage. Name the stage activity. Click on Edit Stage to add required activities
inside error handler.

Inside stage activity click on “Add an Action” and add
“Publish” activity which will call JMS queue business service which send the
message to JMS queue.

Now we need to pass fault message to business service
that we have configured inside publish activity. For that add “Replace”
activity. Now whatever you want to pass to JMS queue you can choose from fault
variable.

We will assign fault message to body variable of business
service.

Add reply activity after the publish activity.Click on validate and save the flow. Activate the
session.

Testing Result

We have shut down the SOA service so that we get fault
when OSB try to call it.

Now test the proxy service. When you test the proxy
service you will see error message.

Now to check whether OSB error handler is working or not,
go to JMS queue and check the message.

Hi Vivek , i'm following your blog regularly it's really awesome one and you provided very good information regarding SOA,Sir can you please provide a examples on common error handling for more than two interfaces and as well as,in 12c we have a new adapter called E-Business suite if you provide examples on that adapter that would very helpful for us. Thank you.

About Me

Disclaimer

This blog is solely owned by me and it does not represent any company or customer work. This blog is result of the POC's which I keep on doing during my spare time. Please feel free to reach out to me in case you have any concern regarding material in this blog.