Hi,

if you are using the Camel transport for CXF then I have an idea what the problem could be. By default the cxf transport for camel does not handle faults as exceptions. You have to manually add a CamelTransportFactory and configure it like described in http://camel.apache.org/camel-transport-for-cxf.html . The important setting is the property checkException only if this is true the EXCEPTION_CAUGHT will be set.

Also see https://issues.apache.org/activemq/browse/CAMEL-2128

Greetings

Christian


Am 06.03.2010 16:51, schrieb Jim Talbut:
Hi,

I have a route that looks like this:
                from( sourceEndpoint )
.onException( java.lang.Throwable.class ).process( new Processor() { public void process(Exchange exchange) throws Exception
                                {
                                    log.warn( "onException\n\n\n\n" );
Throwable caused = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class); log.info( "caused = " + caused.getClass().getCanonicalName() ); log.info( "caused = " + caused.getMessage() ); log.info( "caused = " + caused.toString() );
                                    log.info( "caused = " + caused );
                                }
                            }).end()
                        .to( destinationEndpoint );

Both sourceEndpoint and destinationEndpoint are CXF endpoints.
When destinationEndpoint is unavailable (the server is down) the onException handler is thrown correctly.

But if destinationEndpoint returns a SOAP:Fault onException isn't triggered and I can't find out how to modify the SOAP:Fault that the clients of sourceEndpoint receive. I need to ensure that SOAP:Server faults are modified before being returned to the client.

I tried adding a processor, but that only gets called on the way In, whether it returns a fault or not.

I'm new to camel but I've managed to get most of my requirements met, leaving me with just this problem that's got me completely stumped.

Thanks

Jim



Reply via email to