Hi Frank,

The SoapFault object should be passed to the Apache Camel Body object as
defined into the camel-cxf documentation :

http://camel.apache.org/cxf.html#CXF-HowtothrowaSOAPFaultfromCamel --> How
to throw a SOAP Fault from Camel

Example :
from("direct:start").onException(SoapFault.class).maximumRedeliveries(0).handled(true)
    .process(new Processor() {
        public void process(Exchange exchange) throws Exception {
            SoapFault fault = exchange
                .getProperty(Exchange.EXCEPTION_CAUGHT, SoapFault.class);
            exchange.getOut().setFault(true);
            exchange.getOut().setBody(fault);
        }

    }).end().to(serviceURI);

Regards,



On Mon, Nov 17, 2014 at 8:59 AM, Frankiboy <mail.to.fra...@gmail.com> wrote:

>   I want to give this back in my soap fault:
>       Endpoint don't exist in property files Unique log number:
> 1c291263-a2a1-4505-bcc3-efbc260b29a5
>
>       I get this:
>       Sequential processing failed for number 1. Exchange[Message: [Body is
> null]]. Caused by:       [org.apache.cxf.binding.soap.SoapFault - Endpoint
> don't exist in property files Unique log number:
> 1c291263-a2a1-4505-bcc3-efbc260b29a5
>
>       seems like camels framework gives me:
>       Sequential processing failed for number 1. Exchange[Message: [Body is
> null]]. Caused by:         [org.apache.cxf.binding.soap.SoapFault -
>
>        I dont want this camel message, how to remove it ?
>
>
>        Here is my code:
>
>        exchange.removeProperty(Exchange.EXCEPTION_CAUGHT);
>         exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 500);
>         exchange.getOut().setFault(true);
>         SoapFault sf = new SoapFault(message,SoapFault.FAULT_CODE_SERVER);
>         throw sf;
>
>        Frank
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-remove-camel-framework-text-in-my-soap-fault-tp5759195.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Reply via email to