2 Replies Latest reply on Jan 9, 2013 9:48 AM by kanci

    SOAP fault handling

    kanci Newbie

      Hi all,


      I'm trying to setup a small use case with switchyard and camel. It works well when it comes to happy flow. But actually from time to time I get a reasonable fault, which get logged, but somewhat lost.


      So I used the "camel-soap-proxy" quickstart to see if I did something wrong, but actually it happens to behave the same way.

      I added single line to ReverseService to produce conditional fault:


      if ("fail".equals(text)) throw new IllegalArgumentException();


      Then I use the soap-request.xml with soap ui and get correct response for ReverseService and the proxified service.


      After that I replaced "foobar" with "fail" and got the difference - the service itself delivers a fault:


      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">




               <faultstring>Fault occurred while processing.</faultstring>





      but the proxified version delivers the original request:


      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">



            <ns2:reverse xmlns:ns2="urn:switchyard-quickstart:camel-soap-proxy:1.0">






      I used "switchyard-as7-0.7.0.Final.zip" for the above test. Using MessageTrace handler I see, that the Fault is processed, but I have no idea by whom and what can I do to process it myself, preferably in camel xml.


      Is there another example that handles faults? I couldn't found anything appropriated.