This discussion is archived
9 Replies Latest reply: Mar 26, 2013 4:38 AM by 995030 RSS

How to handle exception in OSB 11g

995030 Newbie
Currently Being Moderated
Hi,

In my project, in Proxy services level have to add exception handling , please brief me the steps.
Please let me know
  • 1. Re: How to handle exception in OSB 11g
    Durga Charan Explorer
    Currently Being Moderated
    Hi,

    In OSB proxy service error handling is possible in 4 ways.

    Stage -- Handles all the errors within a stage.

    Pipeline -- Handles all the errors in a pipeline, along with any unhandled errors from any stage in a pipeline.

    Service -- Handles all the errors in a proxy service, along with any unhandled errors in any pipeline in a service. All WS-Security errors are handled at this level.

    System -- Handles all the errors that are not handled any where else in a pipeline.

    You can find more info at below links.
    http://docs.oracle.com/cd/E21764_01/doc.1111/e15867/modelingmessageflow.htm#i1040168
    http://svgonugu.wordpress.com/2011/06/15/fault-handling-in-osb/

    Cheers,
    Durga
  • 2. Re: How to handle exception in OSB 11g
    Eric Elzinga Oracle ACE
    Currently Being Moderated
    and some shameless self promotion:
    http://www.xenta.nl/blog/2010/07/17/oracle-service-bus-11g-handling-soap-faults/
    http://www.xenta.nl/blog/2011/10/31/oracle-service-bus-generic-fault-handling/
  • 3. Re: How to handle exception in OSB 11g
    995030 Newbie
    Currently Being Moderated
    Hi Eric

    In my project one proxy service calling 1 or 2 Bussiness services.
    i tried 1 st link in my project. its worked also, if i added error handler node in routing section, i am not getting anything.
    how to impliment the error handling in proxy services calling 1 or 2 Bussiness services.
    Please let me know .

    Thanks
  • 4. Re: How to handle exception in OSB 11g
    Prabu Pro
    Currently Being Moderated
    Can you be more clear...When you say you are not getting anything in route error handler - in what scenario?

    Could you please log the $fault variable inside your route error stage and check what is getting logged please.
  • 5. Re: How to handle exception in OSB 11g
    995030 Newbie
    Currently Being Moderated
    Hi, Eric

    i tried above link. In my project.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode xmlns:soap="fault/webservices/vendavo/com">soapenv:Server</faultcode>
    <faultstring>BEA-380000*:* </faultstring>
    <detail>
    <con:fault xmlns:con="fault/webservices/vendavo/com">
    <errorCode>BEA-380000</errorCode>
    *<reason/>*
    <location>
    <node>RouteTo_VendavoCallOutBS</node>
    <path>response-pipeline</path>
    </location>
    <operation>find</operation>
    <uri>
    /SFADeal/ </uri>
    <host/>
    <request_body/>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>


    In this responce i am not getting reason of the fault, what i need to do for to get the reason
    Please let me know

    Thanks..
  • 6. Re: How to handle exception in OSB 11g
    Eric Elzinga Oracle ACE
    Currently Being Moderated
    easiest way is to create the soap fault in your service error handler and just putch $fault and $body somewhere in the details.

    then you will see what you retrieve from the occured fault and which information is in which variable
    or use the debugger from within eclipse and trace the fault untill you're in the service error handler and see the content of both variables
  • 7. Re: How to handle exception in OSB 11g
    995030 Newbie
    Currently Being Moderated
    Hi,

    In my response, if i pass the valid ID also
    i am getting reason as bellow


    <con:reason>
    Failed to set the value of context variable "body". Value must be an instance of {http://schemas.xmlsoap.org/soap/envelope/}Body.
    </con:reason>


    Please let me know what i need to modify in Message flow nodes.

    Thanks & regards
  • 8. Re: How to handle exception in OSB 11g
    AbhishekJ Pro
    Currently Being Moderated
    You have a replace action somewhere where you are doing
    Replacing entire node of $body with some custom XML. Choose the option replace node contents in the replace action and try again.
  • 9. Re: How to handle exception in OSB 11g
    995030 Newbie
    Currently Being Moderated
    Hi,

    i tried, but still am getting same error. Please let me know the other solution

    Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points