Hi Freeman,

Thanks for the reply.  I'm not looking to hack anything, I'd much rather do
things properly.  I've tried using useSOAPEnvelope="true" and setting the
entire soap fault manually from my camel route, e.g:

public class SoapFaultRouteBuilder extends RouteBuilder {

    private static final String FROM_URI
        = "jbi:endpoint:urn:testcase/SoapFaultTestCase/Router";

    public final void configure() {

        from(FROM_URI)
            .setFaultBody(constant(getCannedFault()));
    }

    private String getCannedFault() {
        return "<soap:Envelope
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\";>" +
                    "<soap:Body>" +
                        "<soap:Fault>" +
                            "<faultcode>soap:SERVER</faultcode>" +
                            "<faultstring>My custom
faultstring</faultstring>" +
                            "<detail>My custom detail</detail>" +
                        "</soap:Fault>" +
                    "</soap:Body>" +
                "</soap:Envelope>";
    }
}

But the faultcode and faultstring are discarded in CxfBcConsumer.java and I
end up with:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:detail</faultcode>
         <faultstring>Fault occured</faultstring>
         <detail>My custom detail</detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

Thanks for any further suggestions,
steve.
-- 
View this message in context: 
http://servicemix.396122.n5.nabble.com/Setting-faultcode-for-CXFBC-tp1842385p1843283.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to