1 Reply Latest reply on Jul 17, 2012 11:52 PM by njiang

    Problem Applying XSLT to SOAP Faults from CXF (payload) Producer

    gatredknee

      I've set-up a route that consumes simple XML and produces SOAP messages using CXF (dataFormat=payload).  I use XSLT to translate between the simple XML and the SOAP XML.  It works as expected for successful SOAP messages, but I'm having trouble with failures.  I'd like to be able to use XSLT to translate the SOAP Fault to simple XML, but CXF is returning an instance of its own SoapFault class in the exchange properties rather than a SOAP Fault as the body.

       

      Is there a simple way to set-up the route such that I can use XSLT to translate the CXF response to simple XML (e.g., to configure CXF to return the raw SOAP Fault as body payload)?

        • 1. Re: Problem Applying XSLT to SOAP Faults from CXF (payload) Producer
          njiang

          when you using the data format payload, camel-cxf producer will try to turn the SOAP fault into the exception as it will try to understand the response message.

           

          If you don't want that kind of feature and try to do the mapping yourself, you may consider the MESSAGE dataformat. In this way, camel-cxf producer will not touch the under layer the message and you need to skip the soap envelope yourself.

           

          Willem