1 Reply Latest reply on Nov 13, 2011 10:38 PM by tcunning

    Need more clarity on how to send custom faults back

    joe_boy12

      hello folks

       

      I was looking for some examples where we can send the custom fault back to client which called SOAP based WS.
      I found one thread and it has been really helpful to understand how it works. However I have couple Qs around below scenario.

      http://community.jboss.org/message/603629#603629

       

      I am using off-the-shelf action from ESB APIs which throws ActionProcessingException in pipeline
      e.g. HttpRouter which finds Unknown Host and breaks the pipeline - in this case how can I catch the exception and send the
      custom fault back to my caller. I tried using custom action with @OnException method at very begining and it does get called too,
      however even though I add my custom fault message to message body - the default SOAP fault get sent with fault string as ex.getMessage()
      If I throw ActionProcessingFaultException from @OnException methods - gives me some more other exceptions but default fault is sent.
      It is only when my @Process method in my custom actions throws  ActionProcessingFaultException with correct fault message in message body works fine.

       

      am I missing anything? is there any more documentation where I can see how custom faults are sent back?

        • 1. Re: Need more clarity on how to send custom faults back
          tcunning

          The Programmer's guide has a little, but probably not the detail that you are looking for.    You're probably better off doing what it seems you have been doing - going through posts to see how other people dealt with similar problems.     I don't really know what is going on with your code here when you say it gives you some other exceptions and the default fault is sent - there's not much detail there.