4 Replies Latest reply: Mar 18, 2013 2:48 AM by Willem Jiang RSS

    Camel doesn't recognize faults as exceptions

    Alexander Durnev Newbie

      I've encountered a very strange problem with Fuse ESB 7.1.0: when a cxf endpoint produces a fault, then this fault doesn't look like an exception, so I can't process it using doCatch construction.

      The cxf endpoint is defined as follows:

      -


            

      -


       

      And here is a short code snippet where I expect an exception:

      -


                      

      -


      I've tried to add handleFault="true" attribute to both a camel context and a route, but without success.

      A bundle with a similar parameters and routes has worked as expected on Fuse ESB/ServiceMix 4.4.1, so it looks like a regression or maybe something has changed in camel in the new release?

       

      Another interesting moment is that when a web server is not available, then camel produces org.apache.cxf.interceptor.Fault, so it can't be handled as an exception!

       

      Edited by: alexander.durnev on Mar 1, 2013 8:39 AM