You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/07/21 18:18:41 UTC

[camel] branch CAMEL-13755 created (now 161c464)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git.


      at 161c464  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

This branch includes the following new commits:

     new 2a5a161d CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new 374fe43  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new e76b167  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new f12d961  Regen
     new 793a04b  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new 3760893  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new 91e25ea  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new a1cce331 CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new 573c4a5  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new 4e170eb  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
     new 161c464  CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 02/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 374fe43ea9a27745273339610a8c0bdb0a468ce1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jul 19 10:12:03 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../org/apache/camel/reifier/ProcessorReifier.java |  1 -
 .../apache/camel/reifier/SetFaultBodyReifier.java  | 41 ---------
 .../camel/builder/FluentProducerTemplateTest.java  | 15 ----
 .../camel/impl/DefaultProducerTemplateTest.java    | 12 ---
 .../org/apache/camel/processor/PipelineTest.java   | 19 -----
 .../RedeliverWithExceptionAndFaultTest.java        | 98 ----------------------
 ...deliveryWithExceptionAndFaultDelayInHeader.java | 97 ---------------------
 .../UnitOfWorkSynchronizationAdapterTest.java      |  6 +-
 .../org/apache/camel/processor/UnitOfWorkTest.java | 19 +----
 .../camel/processor/enricher/EnricherTest.java     | 34 +-------
 .../camel/processor/enricher/FailureProcessor.java | 18 +---
 11 files changed, 5 insertions(+), 355 deletions(-)

diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index c8685ec..c84b4c3 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -161,7 +161,6 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> {
         map.put(ServiceCallDefinition.class, ServiceCallReifier::new);
         map.put(SetBodyDefinition.class, SetBodyReifier::new);
         map.put(SetExchangePatternDefinition.class, SetExchangePatternReifier::new);
-        map.put(SetFaultBodyDefinition.class, SetFaultBodyReifier::new);
         map.put(SetHeaderDefinition.class, SetHeaderReifier::new);
         map.put(SetPropertyDefinition.class, SetPropertyReifier::new);
         map.put(SortDefinition.class, SortReifier::new);
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java
deleted file mode 100644
index c948c7e..0000000
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.reifier;
-
-import org.apache.camel.Expression;
-import org.apache.camel.Processor;
-import org.apache.camel.model.ProcessorDefinition;
-import org.apache.camel.model.SetFaultBodyDefinition;
-import org.apache.camel.spi.RouteContext;
-
-@Deprecated
-public class SetFaultBodyReifier extends ExpressionReifier<SetFaultBodyDefinition> {
-
-    SetFaultBodyReifier(ProcessorDefinition<?> definition) {
-        super((SetFaultBodyDefinition) definition);
-    }
-
-    @Override
-    public Processor createProcessor(RouteContext routeContext) throws Exception {
-        final Expression expr = definition.getExpression().createExpression(routeContext);
-        return exchange -> {
-            Object body = expr.evaluate(exchange, Object.class);
-            exchange.getMessage().setFault(true);
-            exchange.getMessage().setBody(body);
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
index 2cb75ad..c35b5fd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
@@ -153,21 +153,6 @@ public class FluentProducerTemplateTest extends ContextTestSupport {
     }
 
     @Test
-    public void testFault() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(0);
-
-        Object result = DefaultFluentProducerTemplate.on(context)
-            .withBody("Hello World")
-            .to("direct:fault")
-            .request();
-
-        assertMockEndpointsSatisfied();
-
-        assertEquals("Faulty World", result);
-    }
-
-    @Test
     public void testExceptionUsingBody() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(0);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
index 6050156..c1a63ce 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
@@ -63,18 +63,6 @@ public class DefaultProducerTemplateTest extends ContextTestSupport {
     }
 
     @Test
-    public void testFault() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(0);
-
-        Object result = template.requestBody("direct:fault", "Hello World");
-
-        assertMockEndpointsSatisfied();
-
-        assertEquals("Faulty World", result);
-    }
-
-    @Test
     public void testExceptionUsingBody() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(0);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
index 16454bf..14e1030 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
@@ -76,25 +76,6 @@ public class PipelineTest extends ContextTestSupport {
         assertEquals(3, exchange.getOut().getHeader("copy-counter"));        
     }
 
-    /**
-     * Disabled for now until we figure out fault processing in the pipeline.
-     * 
-     * @throws Exception
-     */
-    @Test
-    public void testFaultStopsPipeline() throws Exception {
-        Exchange exchange = template.request("direct:c", new Processor() {
-            public void process(Exchange exchange) {
-                exchange.getIn().setBody("Fault Message");
-            }
-        });
-        
-        // Check the fault..
-        assertTrue(exchange.getOut() != null && exchange.getOut().isFault());
-        assertEquals("Fault Message", exchange.getOut().getBody());
-        assertEquals(2, exchange.getOut().getHeader("copy-counter"));        
-    }
-
     @Test
     public void testOnlyProperties() {
         Exchange exchange = template.request("direct:b", new Processor() {
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RedeliverWithExceptionAndFaultTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/RedeliverWithExceptionAndFaultTest.java
deleted file mode 100644
index ac5ce17..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RedeliverWithExceptionAndFaultTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class RedeliverWithExceptionAndFaultTest extends ContextTestSupport {
-
-    private static int counter;
-
-    @Test
-    public void testOk() throws Exception {
-        counter = 0;
-
-        getMockEndpoint("mock:result").expectedMessageCount(1);
-
-        String out = template.requestBody("direct:start", "Hello World", String.class);
-        assertEquals("Bye World", out);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testTransientAndPersistentError() throws Exception {
-        counter = 0;
-
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        String out = template.requestBody("direct:start", "Boom", String.class);
-        assertEquals("Persistent error", out);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testTransientAndPersistentErrorWithExchange() throws Exception {
-        counter = 0;
-
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        Exchange out = template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Boom");
-            }
-        });
-        assertTrue("Should be failed", out.isFailed());
-        assertNull("No exception", out.getException());
-        assertTrue(out.getOut() != null && out.getOut().isFault());
-        assertEquals("Persistent error", out.getOut().getBody());
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                errorHandler(defaultErrorHandler().maximumRedeliveries(5).redeliveryDelay(0));
-
-                from("direct:start")
-                    .process(new Processor() {
-                        public void process(Exchange exchange) throws Exception {
-                            counter++;
-                            if (counter < 3) {
-                                throw new IllegalArgumentException("Try again");
-                            }
-
-                            if (exchange.getIn().getBody().equals("Boom")) {
-                                exchange.getOut().setFault(true);
-                                exchange.getOut().setBody("Persistent error");
-                            } else {
-                                exchange.getOut().setBody("Bye World");
-                            }
-                        }
-                    }).to("mock:result");
-            }
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryWithExceptionAndFaultDelayInHeader.java b/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryWithExceptionAndFaultDelayInHeader.java
deleted file mode 100644
index fd00b97..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/RedeliveryWithExceptionAndFaultDelayInHeader.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-
-public class RedeliveryWithExceptionAndFaultDelayInHeader extends ContextTestSupport {
-
-    private static int counter;
-
-    public void testOk() throws Exception {
-        counter = 0;
-
-        getMockEndpoint("mock:result").expectedMessageCount(1);
-
-        String out = template.requestBody("direct:start", "Hello World", String.class);
-        assertEquals("Bye World", out);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    public void testTransientAndPersistentError() throws Exception {
-        counter = 0;
-
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        String out = template.requestBody("direct:start", "Boom", String.class);
-        assertEquals("Persistent error", out);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    public void testTransientAndPersistentErrorWithExchange() throws Exception {
-        counter = 0;
-
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        Exchange out = template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Boom");
-            }
-        });
-        assertTrue("Should be failed", out.isFailed());
-        assertNull("No exception", out.getException());
-        assertTrue(out.getOut() != null && out.getOut().isFault());
-        assertEquals("Persistent error", out.getOut().getBody());
-
-        assertMockEndpointsSatisfied();
-
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                errorHandler(defaultErrorHandler().maximumRedeliveries(5));
-
-                from("direct:start")
-
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                exchange.getIn().setHeader(Exchange.REDELIVERY_DELAY, 100);
-                                counter++;
-                                if (counter < 3) {
-                                    throw new IllegalArgumentException("Try again");
-                                }
-
-                                if (exchange.getIn().getBody().equals("Boom")) {
-                                    exchange.getOut().setFault(true);
-                                    exchange.getOut().setBody("Persistent error");
-                                } else {
-                                    exchange.getOut().setBody("Bye World");
-                                }
-                            }
-                        }).to("mock:result");
-            }
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java
index a8f02a4..1925514 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkSynchronizationAdapterTest.java
@@ -50,11 +50,7 @@ public class UnitOfWorkSynchronizationAdapterTest extends UnitOfWorkTest {
                         });
 
                         String name = getName();
-                        if (name.equals("testFail")) {
-                            log.info("Failing test!");
-                            exchange.getOut().setFault(true);
-                            exchange.getOut().setBody("testFail() should always fail with a fault!");
-                        } else if (name.equals("testException")) {
+                        if (name.equals("testException")) {
                             log.info("Throwing exception!");
                             throw new Exception("Failing test!");
                         }
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java
index 1df1ef0..5235b16 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/UnitOfWorkTest.java
@@ -49,19 +49,6 @@ public class UnitOfWorkTest extends ContextTestSupport {
     }
 
     @Test
-    public void testFail() throws Exception {
-        sendMessage();
-
-        assertTrue("Exchange did not complete.", doneLatch.await(5, TimeUnit.SECONDS));
-        assertNull("Should not have completed", completed);
-        assertNotNull("Should have received failed notification", failed);
-        assertEquals("Should have propagated the header inside the Synchronization.onFailure() callback", "bat", baz);
-        assertNull("The Synchronization.onComplete() callback should have not been invoked", foo);
-
-        log.info("Received fail: " + failed);
-    }
-
-    @Test
     public void testException() throws Exception {
         sendMessage();
 
@@ -115,11 +102,7 @@ public class UnitOfWorkTest extends ContextTestSupport {
                         exchange.getUnitOfWork().addSynchronization(synchronization);
 
                         String name = getName();
-                        if (name.equals("testFail")) {
-                            log.info("Failing test!");
-                            exchange.getOut().setFault(true);
-                            exchange.getOut().setBody("testFail() should always fail with a fault!");
-                        } else if (name.equals("testException")) {
+                        if (name.equals("testException")) {
                             log.info("Throwing exception!");
                             throw new Exception("Failing test!");
                         }
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherTest.java
index ad251ba..9449fe2 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/EnricherTest.java
@@ -50,22 +50,6 @@ public class EnricherTest extends ContextTestSupport {
     }
 
     @Test
-    public void testEnrichFaultInOnly() throws InterruptedException {
-        mock.expectedMessageCount(0);
-        Exchange exchange = template.send("direct:enricher-test-3", new Processor() {
-            public void process(Exchange exchange) {
-                exchange.getIn().setBody("test");
-            }
-        });
-        mock.assertIsSatisfied();
-        assertEquals("test", exchange.getIn().getBody());
-        assertTrue(exchange.getOut() != null && exchange.getOut().isFault());
-        assertEquals("failed", exchange.getOut().getBody());
-        assertEquals("direct://enricher-fault-resource", exchange.getProperty(Exchange.TO_ENDPOINT));
-        assertNull(exchange.getException());
-    }
-
-    @Test
     public void testEnrichErrorInOnly() throws InterruptedException {
         mock.expectedMessageCount(0);
         Exchange exchange = template.send("direct:enricher-test-4", new Processor() {
@@ -104,19 +88,6 @@ public class EnricherTest extends ContextTestSupport {
     }
 
     @Test
-    public void testEnrichFaultInOut() throws InterruptedException {
-        Exchange exchange = template.send("direct:enricher-test-7", ExchangePattern.InOut, new Processor() {
-            public void process(Exchange exchange) {
-                exchange.getIn().setBody("test");
-            }
-        });
-        assertEquals("test", exchange.getIn().getBody());
-        assertTrue(exchange.getOut() != null && exchange.getOut().isFault());
-        assertEquals("failed", exchange.getOut().getBody());
-        assertNull(exchange.getException());
-    }
-
-    @Test
     public void testEnrichErrorInOut() throws InterruptedException {
         Exchange exchange = template.send("direct:enricher-test-8", ExchangePattern.InOut, new Processor() {
             public void process(Exchange exchange) {
@@ -164,9 +135,8 @@ public class EnricherTest extends ContextTestSupport {
                 // -------------------------------------------------------------
 
                 from("direct:enricher-constant-resource").transform().constant("blah");
-                
-                from("direct:enricher-fault-resource").errorHandler(noErrorHandler()).process(new FailureProcessor(false));
-                from("direct:enricher-error-resource").errorHandler(noErrorHandler()).process(new FailureProcessor(true));
+
+                from("direct:enricher-error-resource").errorHandler(noErrorHandler()).process(new FailureProcessor());
             }
         };
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
index e263075..3654b6f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
@@ -19,26 +19,10 @@ package org.apache.camel.processor.enricher;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 
-@Deprecated
 public class FailureProcessor implements Processor {
 
-    private boolean error;
-    
-    public FailureProcessor() {
-        this(false);
-    }
-    
-    public FailureProcessor(boolean error) {
-        this.error = error;
-    }
-    
     public void process(Exchange exchange) throws Exception {
-        if (error) {
-            throw new RuntimeException("failed");
-        } else {
-            exchange.getOut().setFault(true);
-            exchange.getOut().setBody("failed");
-        }
+        throw new RuntimeException("failed");
     }
 
 }


[camel] 10/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4e170eb619ef5f5bc2e03606d529065bcc2a2692
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jul 21 19:35:25 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 components/camel-cxf/src/main/docs/cxf-component.adoc              | 2 +-
 .../src/main/java/org/apache/camel/component/milo/Messages.java    | 1 -
 .../src/main/java/org/apache/camel/support/DefaultMessage.java     | 7 -------
 docs/components/modules/ROOT/pages/cxf-component.adoc              | 2 +-
 .../src/main/resources/META-INF/spring-configuration-metadata.json | 7 -------
 5 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/components/camel-cxf/src/main/docs/cxf-component.adoc b/components/camel-cxf/src/main/docs/cxf-component.adoc
index 38f3e9f..431bfb2 100644
--- a/components/camel-cxf/src/main/docs/cxf-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxf-component.adoc
@@ -771,7 +771,7 @@ set the SOAP Fault message in the message body and set the response
 code in the message header.
 
 Same for using POJO data format. You can set the SOAPFault on the out
-body and also indicate it's a fault by calling Message.setFault(true):
+body.
 
 === How to propagate a camel-cxf endpoint's request and response context
 
diff --git a/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java b/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
index db42455..12998ce 100644
--- a/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
+++ b/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
@@ -31,6 +31,5 @@ public final class Messages {
      */
     public static void fillFromDataValue(final DataValue value, final DefaultMessage result) {
         result.setBody(value);
-        result.setFault(value.getStatusCode().isBad());
     }
 }
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java
index 181c750..403b214 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java
@@ -48,13 +48,6 @@ public class DefaultMessage extends MessageSupport {
         setCamelContext(camelContext);
     }
 
-    public boolean isFault() {
-        return false;
-    }
-
-    public void setFault(boolean fault) {
-    }
-
     public Object getHeader(String name) {
         if (hasHeaders()) {
             return getHeaders().get(name);
diff --git a/docs/components/modules/ROOT/pages/cxf-component.adoc b/docs/components/modules/ROOT/pages/cxf-component.adoc
index 38f3e9f..431bfb2 100644
--- a/docs/components/modules/ROOT/pages/cxf-component.adoc
+++ b/docs/components/modules/ROOT/pages/cxf-component.adoc
@@ -771,7 +771,7 @@ set the SOAP Fault message in the message body and set the response
 code in the message header.
 
 Same for using POJO data format. You can set the SOAPFault on the out
-body and also indicate it's a fault by calling Message.setFault(true):
+body.
 
 === How to propagate a camel-cxf endpoint's request and response context
 
diff --git a/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json b/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json
index e2830d0..8efef32 100644
--- a/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json
+++ b/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json
@@ -1661,13 +1661,6 @@
 			"defaultValue":"false"
 		},
 		{
-			"name":"camel.component.jms.transfer-fault",
-			"type":"java.lang.Boolean",
-			"sourceType":"org.apache.camel.component.jms.JmsComponent",
-			"description":"If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components that support  [...]
-			"defaultValue":"false"
-		},
-		{
 			"name":"camel.component.jms.jms-operations",
 			"type":"org.springframework.jms.core.JmsOperations",
 			"sourceType":"org.apache.camel.component.jms.JmsComponent",


[camel] 11/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 161c46404b6e4d7a41046f47a5ab2accc9121b11
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jul 21 19:40:19 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../src/main/docs/eips/setFaultBody-eip.adoc       | 39 ----------------------
 docs/user-manual/modules/ROOT/nav.adoc             |  1 -
 .../modules/ROOT/pages/setFaultBody-eip.adoc       | 39 ----------------------
 .../trgt/classes/org/apache/camel/model/aop.json   |  2 +-
 .../test/resources/integration/camel-spring.xsd    |  1 -
 .../src/test/resources/json/aop.json               |  2 +-
 6 files changed, 2 insertions(+), 82 deletions(-)

diff --git a/core/camel-core/src/main/docs/eips/setFaultBody-eip.adoc b/core/camel-core/src/main/docs/eips/setFaultBody-eip.adoc
deleted file mode 100644
index 095d9ed..0000000
--- a/core/camel-core/src/main/docs/eips/setFaultBody-eip.adoc
+++ /dev/null
@@ -1,39 +0,0 @@
-[[setFaultBody-eip]]
-== Set Fault Body EIP
-
-The SetFaultBody EIP allows you to set contents of a fault message's body.
-
-=== Options
-
-// eip options: START
-The Set Fault Body EIP has no options.
-// eip options: END
-
-=== Examples
-
-The following example shows how to use the SetFaultBody EIP
-
-[source,java]
-----
-RouteBuilder builder = new RouteBuilder() {
-    public void configure() {
-        from("direct:a")
-            .setFaultBody(constant("test"))
-            .to("direct:b");
-    }
-};
-----
-
-
-And the same example using XML:
-
-[source,xml]
-----
-<camelContext xmlns="http://camel.apache.org/schema/spring">
-    <route>
-        <from uri="direct:a"/>
-        <setFaultBody><constant>test</constant></setFaultBody>
-        <to uri="direct:b"/>
-    </route>
-</camelContext>
-----
diff --git a/docs/user-manual/modules/ROOT/nav.adoc b/docs/user-manual/modules/ROOT/nav.adoc
index cab60cb..a0ae105 100644
--- a/docs/user-manual/modules/ROOT/nav.adoc
+++ b/docs/user-manual/modules/ROOT/nav.adoc
@@ -100,7 +100,6 @@
  ** xref:script-eip.adoc[Script EIP]
  ** xref:serviceCall-eip.adoc[Service Call EIP]
  ** xref:setBody-eip.adoc[Set Body EIP]
- ** xref:setFaultBody-eip.adoc[Set Fault Body EIP]
  ** xref:setHeader-eip.adoc[Set Header EIP]
  ** xref:setOutHeader-eip.adoc[Set Out Header EIP (deprecated)]
  ** xref:setProperty-eip.adoc[Set Property EIP]
diff --git a/docs/user-manual/modules/ROOT/pages/setFaultBody-eip.adoc b/docs/user-manual/modules/ROOT/pages/setFaultBody-eip.adoc
deleted file mode 100644
index 095d9ed..0000000
--- a/docs/user-manual/modules/ROOT/pages/setFaultBody-eip.adoc
+++ /dev/null
@@ -1,39 +0,0 @@
-[[setFaultBody-eip]]
-== Set Fault Body EIP
-
-The SetFaultBody EIP allows you to set contents of a fault message's body.
-
-=== Options
-
-// eip options: START
-The Set Fault Body EIP has no options.
-// eip options: END
-
-=== Examples
-
-The following example shows how to use the SetFaultBody EIP
-
-[source,java]
-----
-RouteBuilder builder = new RouteBuilder() {
-    public void configure() {
-        from("direct:a")
-            .setFaultBody(constant("test"))
-            .to("direct:b");
-    }
-};
-----
-
-
-And the same example using XML:
-
-[source,xml]
-----
-<camelContext xmlns="http://camel.apache.org/schema/spring">
-    <route>
-        <from uri="direct:a"/>
-        <setFaultBody><constant>test</constant></setFaultBody>
-        <to uri="direct:b"/>
-    </route>
-</camelContext>
-----
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-core-integration/trgt/classes/org/apache/camel/model/aop.json b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-core-integration/trgt/classes/org/apache/camel/model/aop.json
index 7f32f72..d39e766 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-core-integration/trgt/classes/org/apache/camel/model/aop.json
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-core-integration/trgt/classes/org/apache/camel/model/aop.json
@@ -13,7 +13,7 @@
     "beforeUri": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "beforeUri documentation" },
     "afterUri": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "Endpoint to call in AOP after. The difference between after and afterFinally is that afterFinally is invoked from a finally block so it will always be invoked no matter what eg also in case of an exception occur." },
     "afterFinallyUri": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "Endpoint to call in AOP after finally. The difference between after and afterFinally is that afterFinally is invoked from a finally block so it will always be invoked no matter what eg also in case of an exception occur." },
-    "outputs": { "kind": "element", "required": "true", "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "aop", "bean", "choice", "convertBodyTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "inOnly", "inOut", "intercept", "interceptFrom", "interceptSendToEndpoint", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "otherwise", " [...]
+    "outputs": { "kind": "element", "required": "true", "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "aop", "bean", "choice", "convertBodyTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "inOnly", "inOut", "intercept", "interceptFrom", "interceptSendToEndpoint", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "otherwise", " [...]
     "id": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "id documentation" },
     "description": { "kind": "element", "required": "false", "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": "false", "description": "Sets the description of this node" }
   }
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-spring.xsd b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-spring.xsd
index 64676c4..9e7b5a7 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-spring.xsd
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/integration/camel-spring.xsd
@@ -85,7 +85,6 @@
             <xs:element ref="tns:sample"/>
             <xs:element ref="tns:setBody"/>
             <xs:element ref="tns:setExchangePattern"/>
-            <xs:element ref="tns:setFaultBody"/>
             <xs:element ref="tns:setHeader"/>
             <xs:element ref="tns:setOutHeader"/>
             <xs:element ref="tns:setProperty"/>
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/json/aop.json b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/json/aop.json
index 3d91228..fc57b73 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/json/aop.json
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/test/resources/json/aop.json
@@ -13,7 +13,7 @@
     "beforeUri": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "Endpoint to call in AOP before." },
     "afterUri": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "Endpoint to call in AOP after. The difference between after and afterFinally is that afterFinally is invoked from a finally block so it will always be invoked no matter what eg also in case of an exception occur." },
     "afterFinallyUri": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "Endpoint to call in AOP after finally. The difference between after and afterFinally is that afterFinally is invoked from a finally block so it will always be invoked no matter what eg also in case of an exception occur." },
-    "outputs": { "kind": "element", "required": "true", "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "aop", "bean", "choice", "convertBodyTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "inOnly", "inOut", "intercept", "interceptFrom", "interceptSendToEndpoint", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "otherwise", " [...]
+    "outputs": { "kind": "element", "required": "true", "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "aop", "bean", "choice", "convertBodyTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "inOnly", "inOut", "intercept", "interceptFrom", "interceptSendToEndpoint", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "otherwise", " [...]
     "id": { "kind": "attribute", "required": "false", "type": "string", "javaType": "java.lang.String", "deprecated": "false", "description": "Sets the id of this node" },
     "description": { "kind": "element", "required": "false", "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": "false", "description": "Sets the description of this node" }
   }


[camel] 04/11: Regen

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f12d96110cb342a8e09173b46e9280e8a62cdb67
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Jul 20 14:05:05 2019 +0200

    Regen
---
 examples/README.adoc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/README.adoc b/examples/README.adoc
index 15a2bfe..c5ea763 100644
--- a/examples/README.adoc
+++ b/examples/README.adoc
@@ -11,7 +11,7 @@ View the individual example READMEs for details.
 ### Examples
 
 // examples: START
-Number of Examples: 113 (0 deprecated)
+Number of Examples: 114 (0 deprecated)
 
 [width="100%",cols="4,2,4",options="header"]
 |===
@@ -183,6 +183,8 @@ Number of Examples: 113 (0 deprecated)
 
 | link:camel-example-kafka/README.adoc[Kafka] (camel-example-kafka) | Messaging | An example for Kafka
 
+| link:camel-example-kafka-offsetrepository/README.adoc[Kafka Offsetrepository] (camel-example-kafka-offsetrepository) | Messaging | An example for Kafka offsetrepository
+
 | link:camel-example-main-artemis/readme.adoc[Main Artemis] (camel-example-main-artemis) | Messaging | An example for showing standalone Camel with Artemis (autowiring JMS client via classpath scanning)
 
 | link:camel-example-netty-custom-correlation/readme.adoc[Netty Custom Correlation] (camel-example-netty-custom-correlation) | Messaging | An example for showing Camel Netty with custom codec and correlation id


[camel] 06/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 376089324736a01a592d51a7770d0d7334f6d5b0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Jul 20 14:45:09 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 MIGRATION.md                                       |   3 +
 .../camel/attachment/DefaultAttachmentMessage.java |  10 --
 .../camel/component/jetty/HttpReturnFaultTest.java |  58 ----------
 .../camel/component/jetty/HttpRouteTest.java       |   1 -
 .../camel-jms/src/main/docs/jms-component.adoc     |   6 +-
 .../component/jms/EndpointMessageListener.java     |   7 --
 .../org/apache/camel/component/jms/JmsBinding.java |   9 +-
 .../apache/camel/component/jms/JmsComponent.java   |  18 ----
 .../camel/component/jms/JmsConfiguration.java      |  23 ----
 .../apache/camel/component/jms/JmsConstants.java   |   1 -
 .../apache/camel/component/jms/JmsEndpoint.java    |  10 --
 .../org/apache/camel/component/jms/JmsMessage.java |   1 -
 .../component/jms/reply/ReplyManagerSupport.java   |  11 --
 .../camel/component/jms/JmsTransferFaultTest.java  |  90 ----------------
 .../SetFaultBodyAfterJmsRequestReplyIssueTest.java |  86 ---------------
 .../apache/camel/component/mail/MailMessage.java   |   1 -
 .../camel/component/restlet/RestletFaultTest.java  |  52 ---------
 .../src/main/docs/spring-boot.adoc                 |   3 +-
 .../src/main/java/org/apache/camel/Message.java    |  16 ---
 .../java/org/apache/camel/spi/Synchronization.java |   3 +-
 .../camel/processor/OnCompletionProcessor.java     |   1 -
 .../org/apache/camel/processor/PipelineHelper.java |  14 ---
 .../camel/processor/enricher/PollEnricherTest.java |   1 -
 .../endpoint/dsl/JmsEndpointBuilderFactory.java    | 118 ---------------------
 .../org/apache/camel/support/DefaultExchange.java  |   5 +-
 .../org/apache/camel/support/DefaultMessage.java   |   4 +-
 .../org/apache/camel/support/ExchangeHelper.java   |  20 +---
 .../camel/support/builder/ExpressionBuilder.java   |  35 ------
 .../jms/springboot/JmsComponentConfiguration.java  |  39 -------
 29 files changed, 11 insertions(+), 635 deletions(-)

diff --git a/MIGRATION.md b/MIGRATION.md
index ea8a343..ba38cc6 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -140,6 +140,9 @@ To use this API you can get it via the `getMessage` method on `Exchange`:
     AttachmentMessage am = exchange.getMessage(AttachmentMessage.class);
     am.addAttachment("myAtt", new DataHandler(...));
 
+### Fault API on Message
+
+The fault API has been removed from `org.apache.camel.Message` as it was only used for SOAP-WS fault message. The `camel-cxf` and `camel-spring-ws` components for SOAP-WS has been modified to support fault messages from their components. The option `handleFault` has also been removed and you now need to turn this on as endpoint or component option on `camel-cxf` or `camel-spring-ws`.
 
 ### Mock component
 
diff --git a/components/camel-attachments/src/main/java/org/apache/camel/attachment/DefaultAttachmentMessage.java b/components/camel-attachments/src/main/java/org/apache/camel/attachment/DefaultAttachmentMessage.java
index de8d625..fe87215 100644
--- a/components/camel-attachments/src/main/java/org/apache/camel/attachment/DefaultAttachmentMessage.java
+++ b/components/camel-attachments/src/main/java/org/apache/camel/attachment/DefaultAttachmentMessage.java
@@ -58,16 +58,6 @@ public final class DefaultAttachmentMessage implements AttachmentMessage {
     }
 
     @Override
-    public boolean isFault() {
-        return delegate.isFault();
-    }
-
-    @Override
-    public void setFault(boolean fault) {
-        delegate.setFault(fault);
-    }
-
-    @Override
     public Object getHeader(String name) {
         return delegate.getHeader(name);
     }
diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpReturnFaultTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpReturnFaultTest.java
deleted file mode 100644
index c59b4c0..0000000
--- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpReturnFaultTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.jetty;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.http.common.HttpOperationFailedException;
-import org.junit.Test;
-
-public class HttpReturnFaultTest extends BaseJettyTest {
-
-    @Test
-    public void testHttpFault() throws Exception {
-        Exchange exchange = template.request("http://localhost:{{port}}/test", new Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Hello World!");
-            }
-            
-        });
-        assertTrue(exchange.isFailed());
-        HttpOperationFailedException exception = exchange.getException(HttpOperationFailedException.class);
-        assertNotNull(exception);
-        assertEquals("This is a fault", exception.getResponseBody());
-        assertEquals(500, exception.getStatusCode());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("jetty://http://localhost:{{port}}/test")
-                    .process(new Processor() {
-                        public void process(Exchange exchange) throws Exception {
-                            exchange.getOut().setFault(true);
-                            exchange.getOut().setBody("This is a fault");
-                        }
-                    });
-            }
-        };
-    }
-}
diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java
index 939681c..27bed93 100644
--- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java
@@ -202,7 +202,6 @@ public class HttpRouteTest extends BaseJettyTest {
                             HttpSession session = message.getRequest().getSession();
                             assertNotNull("we should get session here", session);
                         } catch (Exception e) {
-                            exchange.getOut().setFault(true);
                             exchange.getOut().setBody(e);
                         }
                         exchange.getOut().setBody("<b>Hello World</b>");
diff --git a/components/camel-jms/src/main/docs/jms-component.adoc b/components/camel-jms/src/main/docs/jms-component.adoc
index aed022e..8e9e1ae 100644
--- a/components/camel-jms/src/main/docs/jms-component.adoc
+++ b/components/camel-jms/src/main/docs/jms-component.adoc
@@ -192,7 +192,7 @@ about these properties by consulting the relevant Spring documentation.
 
 
 // component options: START
-The JMS component supports 81 options, which are listed below.
+The JMS component supports 80 options, which are listed below.
 
 
 
@@ -255,7 +255,6 @@ The JMS component supports 81 options, which are listed below.
 | *requestTimeoutChecker Interval* (advanced) | Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. | 1000 | long
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *jmsOperations* (advanced) | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs. |  | JmsOperations
 | *destinationResolver* (advanced) | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
 | *replyToType* (producer) | Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel will use temporary queues. However if replyTo has been configured, then Shared is used by default. This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation for more details, and especially the notes about the implications if running  [...]
@@ -320,7 +319,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (93 parameters):
+==== Query Parameters (92 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -406,7 +405,6 @@ with the following path and query parameters:
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *useMessageIDAsCorrelation ID* (advanced) | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | boolean
 | *waitForProvisionCorrelation ToBeUpdatedCounter* (advanced) | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | int
 | *waitForProvisionCorrelation ToBeUpdatedThreadSleeping Time* (advanced) | Interval in millis to sleep each time while waiting for provisional correlation id to be updated. | 100 | long
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
index afb1aaa..c915c82 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/EndpointMessageListener.java
@@ -193,13 +193,6 @@ public class EndpointMessageListener implements SessionAwareMessageListener {
                         // do not send a reply but wrap and rethrow the exception
                         rce = wrapRuntimeCamelException(exchange.getException());
                     }
-                } else {
-                    org.apache.camel.Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-                    if (msg.isFault()) {
-                        // a fault occurred while processing
-                        body = msg;
-                        cause = null;
-                    }
                 }
             } else {
                 // process OK so get the reply body if we are InOut and has a body
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
index 83a9751..b687abb 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java
@@ -510,14 +510,7 @@ public class JmsBinding {
     }
 
     protected Message createJmsMessage(Exchange exchange, org.apache.camel.Message camelMessage, Session session, CamelContext context) throws JMSException {
-        Message answer = createJmsMessage(exchange, camelMessage.getBody(), camelMessage.getHeaders(), session, context);
-
-        // special for transferFault
-        boolean isFault = camelMessage.isFault();
-        if (answer != null && isFault && endpoint != null && endpoint.isTransferFault()) {
-            answer.setBooleanProperty(JmsConstants.JMS_TRANSFER_FAULT, true);
-        }
-        return answer;
+        return createJmsMessage(exchange, camelMessage.getBody(), camelMessage.getHeaders(), session, context);
     }
 
     protected Message createJmsMessage(Exchange exchange, Object body, Map<String, Object> headers, Session session, CamelContext context) throws JMSException {
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
index bbd6ac8..760138d 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
@@ -846,24 +846,6 @@ public class JmsComponent extends HeaderFilterStrategyComponent implements Appli
     }
 
     /**
-     * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side,
-     * then the fault flag on {@link org.apache.camel.Message#isFault()} will be send back in the response as a JMS header with the key
-     * {@link JmsConstants#JMS_TRANSFER_FAULT}.
-     * If the client is Camel, the returned fault flag will be set on the {@link org.apache.camel.Message#setFault(boolean)}.
-     * <p/>
-     * You may want to enable this when using Camel components that support faults such as SOAP based such as cxf or spring-ws.
-     */
-    @Metadata(label = "advanced",
-            description = "If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side,"
-                    + " then the fault flag on Message#isFault() will be send back in the response as a JMS header with the key"
-                    + " org.apache.camel.component.jms.JmsConstants#JMS_TRANSFER_FAULT#JMS_TRANSFER_FAULT."
-                    + " If the client is Camel, the returned fault flag will be set on the {@link org.apache.camel.Message#setFault(boolean)}."
-                    + " You may want to enable this when using Camel components that support faults such as SOAP based such as cxf or spring-ws.")
-    public void setTransferFault(boolean transferFault) {
-        getConfiguration().setTransferFault(transferFault);
-    }
-
-    /**
      * Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface.
      * Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs.
      */
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
index 69863ae..0716826 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
@@ -339,13 +339,6 @@ public class JmsConfiguration implements Cloneable {
                     + " The original Exception on the consumer side can be wrapped in an outer exception"
                     + " such as org.apache.camel.RuntimeCamelException when returned to the producer.")
     private boolean transferException;
-    @UriParam(label = "advanced",
-            description = "If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side,"
-                    + " then the fault flag on Message#isFault() will be send back in the response as a JMS header with the key"
-                    + " org.apache.camel.component.jms.JmsConstants#JMS_TRANSFER_FAULT#JMS_TRANSFER_FAULT."
-                    + " If the client is Camel, the returned fault flag will be set on the {@link org.apache.camel.Message#setFault(boolean)}."
-                    + " You may want to enable this when using Camel components that support faults such as SOAP based such as cxf or spring-ws.")
-    private boolean transferFault;
     @UriParam(description = "Specifies whether to test the connection on startup."
             + " This ensures that when Camel starts that all the JMS consumers have a valid connection to the JMS broker."
             + " If a connection cannot be granted then Camel throws an exception on startup."
@@ -1838,22 +1831,6 @@ public class JmsConfiguration implements Cloneable {
         this.transferException = transferException;
     }
 
-    public boolean isTransferFault() {
-        return transferFault;
-    }
-
-    /**
-     * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side,
-     * then the fault flag on {@link org.apache.camel.Message#isFault()} will be send back in the response as a JMS header with the key
-     * {@link JmsConstants#JMS_TRANSFER_FAULT}.
-     * If the client is Camel, the returned fault flag will be set on the {@link org.apache.camel.Message#setFault(boolean)}.
-     * <p>
-     * You may want to enable this when using Camel components that support faults such as SOAP based such as cxf or spring-ws.
-     */
-    public void setTransferFault(boolean transferFault) {
-        this.transferFault = transferFault;
-    }
-
     public boolean isAsyncStartListener() {
         return asyncStartListener;
     }
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConstants.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConstants.java
index ec0e2d8..68066bb 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConstants.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConstants.java
@@ -27,7 +27,6 @@ public final class JmsConstants {
     public static final String JMS_MESSAGE_TYPE = "CamelJmsMessageType";
     public static final String JMS_DELIVERY_MODE = "CamelJmsDeliveryMode";
     public static final String JMS_REQUEST_TIMEOUT = "CamelJmsRequestTimeout";
-    public static final String JMS_TRANSFER_FAULT = "CamelJmsTransferFault";
 
     private JmsConstants() {
         // utility class
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
index f3b3d6b..2eee68c 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
@@ -1053,16 +1053,6 @@ public class JmsEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade
     }
 
     @ManagedAttribute
-    public void setTransferFault(boolean transferFault) {
-        getConfiguration().setTransferFault(transferFault);
-    }
-
-    @ManagedAttribute
-    public boolean isTransferFault() {
-        return getConfiguration().isTransferFault();
-    }
-
-    @ManagedAttribute
     public boolean isTestConnectionOnStartup() {
         return configuration.isTestConnectionOnStartup();
     }
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
index 440635d..b039166 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
@@ -94,7 +94,6 @@ public class JmsMessage extends DefaultMessage {
 
         // copy body and fault flag
         setBody(that.getBody());
-        setFault(that.isFault());
 
         // we have already cleared the headers
         if (that.hasHeaders()) {
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
index 04a970c..a646db5 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
@@ -185,17 +185,6 @@ public abstract class ReplyManagerSupport extends ServiceSupport implements Repl
                     } else {
                         log.debug("Reply received. OUT message body set to reply payload: {}", body);
                     }
-                    if (endpoint.isTransferFault()) {
-                        // remove the header as we do not want to keep it on the Camel Message either
-                        Object faultHeader = response.removeHeader(JmsConstants.JMS_TRANSFER_FAULT);
-                        if (faultHeader != null) {
-                            boolean isFault = exchange.getContext().getTypeConverter().tryConvertTo(boolean.class, faultHeader);
-                            log.debug("Transfer fault on OUT message: {}", isFault);
-                            if (isFault) {
-                                exchange.getOut().setFault(true);
-                            }
-                        }
-                    }
 
                     // restore correlation id in case the remote server messed with it
                     if (holder.getOriginalCorrelationId() != null) {
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferFaultTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferFaultTest.java
deleted file mode 100644
index b345523..0000000
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferFaultTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.jms;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
-
-public class JmsTransferFaultTest extends CamelTestSupport {
-
-    protected String getUri() {
-        return "activemq:queue:foo?transferFault=true";
-    }
-
-    @Test
-    public void testNoFault() throws Exception {
-        Exchange out = template.request(getUri(), new Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Hello World");
-            }
-        });
-        assertNotNull(out);
-        assertEquals("Bye World", out.getOut().getBody());
-        assertFalse("Should not be a fault", out.getOut().isFault());
-    }
-
-    @Test
-    public void testTransferFault() throws Exception {
-        Exchange out = template.request(getUri(), new Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Kaboom");
-            }
-        });
-        assertNotNull(out);
-        assertEquals("Bye World", out.getOut().getBody());
-        assertTrue("Should be a fault", out.getOut().isFault());
-    }
-  
-    protected CamelContext createCamelContext() throws Exception {
-        CamelContext camelContext = super.createCamelContext();
-
-        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
-        camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
-
-        return camelContext;
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from(getUri())
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                String body = exchange.getIn().getBody(String.class);
-                                exchange.getOut().setBody("Bye World");
-                                if (body.equals("Kaboom")) {
-                                    exchange.getOut().setFault(true);
-                                }
-                            }
-                        });
-            }
-        };
-    }
-
-}
\ No newline at end of file
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/SetFaultBodyAfterJmsRequestReplyIssueTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/SetFaultBodyAfterJmsRequestReplyIssueTest.java
deleted file mode 100644
index ca1d7b8..0000000
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/SetFaultBodyAfterJmsRequestReplyIssueTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.jms;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
-
-/**
- * Tests that setting a fault body after doing JMS works. Because JmsMessage has an
- * JMS specific copyFrom method being used.
- */
-public class SetFaultBodyAfterJmsRequestReplyIssueTest extends CamelTestSupport {
-
-    @Test
-    public void testFault() throws Exception {
-        Exchange out = template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Hello World");
-            }
-        });
-
-        assertNotNull(out);
-        assertEquals(true, out.isFailed());
-        assertEquals(true, out.hasOut());
-        assertEquals(true, out.getOut().isFault());
-        assertEquals("OnException", out.getOut().getBody());
-    }
-
-    protected CamelContext createCamelContext() throws Exception {
-        CamelContext camelContext = super.createCamelContext();
-        ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
-        camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
-        return camelContext;
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                onException(IllegalArgumentException.class)
-                    .process(new Processor() {
-                        @Override
-                        public void process(Exchange exchange) throws Exception {
-                            exchange.getOut().setBody("OnException");
-                            exchange.getOut().setFault(true);
-                        }
-                    });
-
-                from("direct:start")
-                    .inOut("activemq:queue:foo")
-                    .throwException(new IllegalArgumentException("Forced"));
-
-                from("activemq:queue:foo")
-                    .process(new Processor() {
-                        public void process(Exchange exchange) throws Exception {
-                            exchange.getOut().setBody("Bye World");
-                        }
-                    });
-            }
-        };
-    }
-
-}
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
index 836c9ee..bec54e0 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
@@ -115,7 +115,6 @@ public class MailMessage extends DefaultMessage {
         } else {
             // no deep copy needed, but copy message id
             setMessageId(that.getMessageId());
-            setFault(that.isFault());
         }
         if (that instanceof MailMessage) {
             MailMessage mailMessage = (MailMessage) that;
diff --git a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java
deleted file mode 100644
index 223bac2..0000000
--- a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.restlet;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.junit.Test;
-
-public class RestletFaultTest extends RestletTestSupport {
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("restlet:http://localhost:" + portNum + "/users/{username}?restletMethod=POST").process(new Processor() {
-                    public void process(Exchange exchange) throws Exception {
-                        exchange.getOut().setFault(true);
-                        exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, "404");
-                        exchange.getOut().setHeader(Exchange.CONTENT_TYPE, "text/plain");
-                        exchange.getOut().setBody("Application fault");
-                    }        
-                });
-            }
-        };
-    }
-    
-    @Test
-    public void testFaultResponse() throws Exception {
-        HttpResponse response = doExecute(new HttpPost("http://localhost:" + portNum + "/users/homer"));
-
-        assertHttpResponse(response, 404, "text/plain", "Application fault");
-    }
-}
\ No newline at end of file
diff --git a/components/camel-spring-boot/src/main/docs/spring-boot.adoc b/components/camel-spring-boot/src/main/docs/spring-boot.adoc
index 230b5c2..c81424e 100644
--- a/components/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/components/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -89,7 +89,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 125 options, which are listed below.
+The component supports 124 options, which are listed below.
 
 
 
@@ -151,7 +151,6 @@ The component supports 125 options, which are listed below.
 | *camel.springboot.duration-max-seconds* | To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.endpoint-runtime-statistics-enabled* | Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints). The default value is false. | false | Boolean
 | *camel.springboot.file-configurations* | Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You must use either file: or classpath: as prefix to load from file system or classpath. Then you can specify a pattern to load from sub directories and a name pattern such as file:/var/ [...]
-| *camel.springboot.handle-fault* | Sets whether fault handling is enabled or not. Default is false. | false | Boolean
 | *camel.springboot.include-non-singletons* | Whether to include non-singleton beans (prototypes) when scanning for RouteBuilder instances. By default only singleton beans is included in the context scan. | false | Boolean
 | *camel.springboot.java-routes-exclude-pattern* | Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: &#42;&#42;/Bar&#42; To exclude all routes form a specific package use: com/mycompany/bar/&#42; To exclude all routes [...]
 | *camel.springboot.java-routes-include-pattern* | Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: &#42;&#42;/Foo* To include all routes form a specific package use: com/mycompany/foo/&#42; To include all routes for [...]
diff --git a/core/camel-api/src/main/java/org/apache/camel/Message.java b/core/camel-api/src/main/java/org/apache/camel/Message.java
index 078ec1d..b1f3745 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Message.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Message.java
@@ -54,22 +54,6 @@ public interface Message {
     Exchange getExchange();
 
     /**
-     * Returns true if this message represents a fault
-     *
-     * @return <tt>true</tt> if this is a fault message, <tt>false</tt> for regular messages.
-     */
-    @Deprecated
-    boolean isFault();
-
-    /**
-     * Sets the fault flag on this message
-     *
-     * @param fault the fault flag
-     */
-    @Deprecated
-    void setFault(boolean fault);
-
-    /**
      * Accesses a specific header
      *
      * @param name  name of header
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/Synchronization.java b/core/camel-api/src/main/java/org/apache/camel/spi/Synchronization.java
index 69659a71..3bc310d 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/Synchronization.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/Synchronization.java
@@ -35,8 +35,7 @@ public interface Synchronization {
 
     /**
      * Called when the processing of the message exchange has failed for some reason.
-     * The exception which caused the problem is in {@link Exchange#getException()} and
-     * there could be a fault message via {@link org.apache.camel.Message#isFault()}
+     * The exception which caused the problem is in {@link Exchange#getException()}.
      *
      * @param exchange the exchange being processed
      */
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java b/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
index 09e7e81..28e1ec0 100644
--- a/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
+++ b/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
@@ -257,7 +257,6 @@ public class OnCompletionProcessor extends AsyncProcessorSupport implements Trac
             // must use a copy as we dont want it to cause side effects of the original exchange
             final Exchange copy = prepareExchange(exchange);
             final Exception original = copy.getException();
-            final boolean originalFault = copy.hasOut() ? copy.getOut().isFault() : copy.getIn().isFault();
             // must remove exception otherwise onFailure routing will fail as well
             // the caused exception is stored as a property (Exchange.EXCEPTION_CAUGHT) on the exchange
             copy.setException(null);
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/PipelineHelper.java b/core/camel-base/src/main/java/org/apache/camel/processor/PipelineHelper.java
index fb2857d..274185f 100644
--- a/core/camel-base/src/main/java/org/apache/camel/processor/PipelineHelper.java
+++ b/core/camel-base/src/main/java/org/apache/camel/processor/PipelineHelper.java
@@ -45,17 +45,6 @@ public final class PipelineHelper {
         if (exchange.isFailed() || exchange.isRollbackOnly() || exceptionHandled) {
             // We need to write a warning message when the exception and fault message be set at the same time
             Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-            if (msg.isFault() && exchange.getException() != null) {
-                StringBuilder sb = new StringBuilder();
-                sb.append("Message exchange has failed: " + message + " for exchange: ").append(exchange);
-                sb.append(" Warning: Both fault and exception exists on the exchange, its best practice to only set one of them.");
-                sb.append(" Exception: ").append(exchange.getException());
-                sb.append(" Fault: ").append(msg);
-                if (exceptionHandled) {
-                    sb.append(" Handled by the error handler.");
-                }
-                log.warn(sb.toString());
-            }
             // The Exchange.ERRORHANDLED_HANDLED property is only set if satisfactory handling was done
             // by the error handler. It's still an exception, the exchange still failed.
             if (log.isDebugEnabled()) {
@@ -67,9 +56,6 @@ public final class PipelineHelper {
                 if (exchange.getException() != null) {
                     sb.append(" Exception: ").append(exchange.getException());
                 }
-                if (msg.isFault()) {
-                    sb.append(" Fault: ").append(msg);
-                }
                 if (exceptionHandled) {
                     sb.append(" Handled by the error handler.");
                 }
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java
index 47b50e7..d6ea69b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java
@@ -118,7 +118,6 @@ public class PollEnricherTest extends ContextTestSupport {
         });
         assertEquals("bar", exchange.getIn().getHeader("foo"));
         assertEquals("test:blah", exchange.getIn().getBody());
-        assertFalse(exchange.hasOut() && exchange.getOut().isFault());
         assertEquals("seda://foo4", exchange.getOut().getHeader(Exchange.TO_ENDPOINT));
         assertNull(exchange.getException());
     }
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
index 6037292..347aa2d 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JmsEndpointBuilderFactory.java
@@ -1828,46 +1828,6 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedJmsEndpointConsumerBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedJmsEndpointConsumerBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
@@ -3755,46 +3715,6 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedJmsEndpointProducerBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedJmsEndpointProducerBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
@@ -4993,44 +4913,6 @@ public interface JmsEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedJmsEndpointBuilder transferFault(boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedJmsEndpointBuilder transferFault(String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java
index 7824fdb..7adcca0 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java
@@ -406,10 +406,7 @@ public final class DefaultExchange implements Exchange {
     }
 
     public boolean isFailed() {
-        if (exception != null) {
-            return true;
-        }
-        return hasOut() ? getOut().isFault() : getIn().isFault();
+        return exception != null;
     }
 
     public boolean isTransacted() {
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java
index a2a3cd7..181c750 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java
@@ -37,7 +37,6 @@ import org.apache.camel.util.ObjectHelper;
  * on the {@link CamelContext}. The default implementation uses the {@link org.apache.camel.util.CaseInsensitiveMap CaseInsensitiveMap}.
  */
 public class DefaultMessage extends MessageSupport {
-    private boolean fault;
     private Map<String, Object> headers;
 
     public DefaultMessage(Exchange exchange) {
@@ -50,11 +49,10 @@ public class DefaultMessage extends MessageSupport {
     }
 
     public boolean isFault() {
-        return fault;
+        return false;
     }
 
     public void setFault(boolean fault) {
-        this.fault = fault;
     }
 
     public Object getHeader(String name) {
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
index c805410..093a43d 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java
@@ -372,7 +372,7 @@ public final class ExchangeHelper {
         // copy out message
         if (source.hasOut()) {
             // exchange pattern sensitive
-            Message resultMessage = source.getOut().isFault() ? result.getOut() : getResultMessage(result);
+            Message resultMessage = getResultMessage(result);
             resultMessage.copyFrom(source.getOut());
         }
 
@@ -675,13 +675,6 @@ public final class ExchangeHelper {
                 throw CamelExecutionException.wrapCamelExecutionException(exchange, exchange.getException());
             }
 
-            // result could have a fault message
-            if (hasFaultMessage(exchange)) {
-                Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-                answer = msg.getBody();
-                return answer;
-            }
-
             // okay no fault then return the response according to the pattern
             // try to honor pattern if provided
             boolean notOut = pattern != null && !pattern.isOutCapable();
@@ -702,17 +695,6 @@ public final class ExchangeHelper {
     }
 
     /**
-     * Tests whether the exchange has a fault message set and that its not null.
-     *
-     * @param exchange the exchange
-     * @return <tt>true</tt> if fault message exists
-     */
-    public static boolean hasFaultMessage(Exchange exchange) {
-        Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-        return msg.isFault() && msg.getBody() != null;
-    }
-
-    /**
      * Tests whether the exchange has already been handled by the error handler
      *
      * @param exchange the exchange
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
index 07ab27d..62128c9 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
@@ -905,41 +905,6 @@ public class ExpressionBuilder {
     }
 
     /**
-     * Returns the expression for the fault messages body
-     */
-    public static Expression faultBodyExpression() {
-        return new ExpressionAdapter() {
-            public Object evaluate(Exchange exchange) {
-                Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-                return msg.isFault() ? msg.getBody() : null;
-            }
-
-            @Override
-            public String toString() {
-                return "faultBody";
-            }
-        };
-    }
-
-    /**
-     * Returns the expression for the exchanges fault message body converted
-     * to the given type
-     */
-    public static <T> Expression faultBodyExpression(final Class<T> type) {
-        return new ExpressionAdapter() {
-            public Object evaluate(Exchange exchange) {
-                Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-                return msg.isFault() ? msg.getBody(type) : null;
-            }
-
-            @Override
-            public String toString() {
-                return "faultBodyAs[" + type.getName() + "]";
-            }
-        };
-    }
-
-    /**
      * Returns the expression for the exchange
      */
     public static Expression exchangeExpression() {
diff --git a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
index dcfafc0..e5c1fdd 100644
--- a/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java
@@ -424,17 +424,6 @@ public class JmsComponentConfiguration
      */
     private Boolean transferException = false;
     /**
-     * If enabled and you are using Request Reply messaging (InOut) and an
-     * Exchange failed with a SOAP fault (not exception) on the consumer side,
-     * then the fault flag on org.apache.camel.Message#isFault() will be send
-     * back in the response as a JMS header with the key
-     * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-     * fault flag will be set on the org.apache.camel.Message#setFault(boolean).
-     * You may want to enable this when using Camel components that support
-     * faults such as SOAP based such as cxf or spring-ws.
-     */
-    private Boolean transferFault = false;
-    /**
      * Allows you to use your own implementation of the
      * org.springframework.jms.core.JmsOperations interface. Camel uses
      * JmsTemplate as default. Can be used for testing purpose, but not used
@@ -1092,14 +1081,6 @@ public class JmsComponentConfiguration
         this.transferException = transferException;
     }
 
-    public Boolean getTransferFault() {
-        return transferFault;
-    }
-
-    public void setTransferFault(Boolean transferFault) {
-        this.transferFault = transferFault;
-    }
-
     public String getJmsOperations() {
         return jmsOperations;
     }
@@ -1752,18 +1733,6 @@ public class JmsComponentConfiguration
          */
         private Boolean transferException = false;
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on {@link
-         * org.apache.camel.Message#isFault()} will be send back in the response
-         * as a JMS header with the key {@link JmsConstants#JMS_TRANSFER_FAULT}.
-         * If the client is Camel, the returned fault flag will be set on the
-         * {@link org.apache.camel.Message#setFault(boolean)}. <p> You may want
-         * to enable this when using Camel components that support faults such
-         * as SOAP based such as cxf or spring-ws.
-         */
-        private Boolean transferFault = false;
-        /**
          * Whether to startup the JmsConsumer message listener asynchronously,
          * when starting a route. For example if a JmsConsumer cannot get a
          * connection to a remote JMS broker, then it may block while retrying
@@ -2521,14 +2490,6 @@ public class JmsComponentConfiguration
             this.transferException = transferException;
         }
 
-        public Boolean getTransferFault() {
-            return transferFault;
-        }
-
-        public void setTransferFault(Boolean transferFault) {
-            this.transferFault = transferFault;
-        }
-
         public Boolean getAsyncStartListener() {
             return asyncStartListener;
         }


[camel] 07/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 91e25ea51113a0d659d8012a11507561c954297c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jul 21 12:40:43 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../src/main/docs/activemq-component.adoc          |   9 +-
 .../camel-amqp/src/main/docs/amqp-component.adoc   |   9 +-
 .../apache/camel/component/cxf/CxfConsumer.java    |   7 +-
 .../camel/component/cxf/CxfConsumerFaultTest.java  |   1 -
 .../cxf/CxfConsumerPayLoadFaultMessageTest.java    |   1 -
 .../cxf/CxfConsumerPayLoadMarshalFaultTest.java    |   1 -
 .../component/cxf/CxfCustomizedExceptionTest.java  |   2 -
 .../cxf/CxfMessageStreamExceptionTest.java         |   1 -
 .../cxf/CxfSpringCustomizedExceptionTest.java      |   1 -
 .../component/cxf/jaxrs/CxfRsConsumerTest.java     |   2 -
 .../apache/camel/non_wrapper/PersonProcessor.java  |   3 -
 .../apache/camel/wsdl_first/PersonProcessor.java   |   3 -
 .../camel-jms/src/main/docs/jms-component.adoc     |   4 +-
 .../netty4/http/NettyHttpReturnFaultTest.java      |  58 ----------
 .../cinder/producer/SnapshotProducer.java          |   4 +-
 .../openstack/cinder/producer/VolumeProducer.java  |   4 +-
 .../common/AbstractOpenstackProducer.java          |   5 +-
 .../openstack/common/OpenstackException.java       |  26 +++++
 .../common/OpenstackOperationException.java        |  43 ++++++++
 .../component/openstack/glance/GlanceProducer.java |   2 +-
 .../keystone/producer/DomainProducer.java          |   2 +-
 .../openstack/keystone/producer/GroupProducer.java |   6 +-
 .../keystone/producer/ProjectProducer.java         |   2 +-
 .../keystone/producer/RegionProducer.java          |   2 +-
 .../openstack/keystone/producer/UserProducer.java  |   2 +-
 .../neutron/producer/NetworkProducer.java          |   2 +-
 .../openstack/neutron/producer/PortProducer.java   |   2 +-
 .../openstack/neutron/producer/RouterProducer.java |   2 +-
 .../openstack/neutron/producer/SubnetProducer.java |   2 +-
 .../openstack/nova/producer/FlavorsProducer.java   |   2 +-
 .../openstack/nova/producer/KeypairProducer.java   |   2 +-
 .../openstack/nova/producer/ServerProducer.java    |   4 +-
 .../swift/producer/ContainerProducer.java          |  13 ++-
 .../openstack/swift/producer/ObjectProducer.java   |   7 +-
 .../openstack/cinder/VolumeProducerTest.java       |   7 +-
 .../cinder/VolumeSnapshotProducerTest.java         |   2 -
 .../openstack/keystone/DomainProducerTest.java     |   5 +-
 .../openstack/keystone/GroupProducerTest.java      |   5 +-
 .../openstack/keystone/ProjectProducerTest.java    |   5 +-
 .../openstack/keystone/RegionProducerTest.java     |   5 +-
 .../openstack/keystone/UserProducerTest.java       |   5 +-
 .../openstack/neutron/NetworkProducerTest.java     |   5 +-
 .../openstack/neutron/PortProducerTest.java        |   5 +-
 .../openstack/neutron/RouterProducerTest.java      |   5 +-
 .../openstack/neutron/SubnetProducerTest.java      |   5 +-
 .../openstack/nova/FlavorProducerTest.java         |   5 +-
 .../openstack/nova/ServerProducerTest.java         |   5 +-
 .../openstack/swift/ContainerProducerTest.java     |   9 +-
 .../openstack/swift/ObjectProducerTest.java        |   8 +-
 .../component/restlet/DefaultRestletBinding.java   |  18 ++--
 .../apache/camel/component/sjms/SjmsMessage.java   |   1 -
 .../sjms/tx/TransactedConsumerSupport.java         |   2 +-
 .../sjms/tx/TransactedQueueProducerTest.java       |   4 +-
 .../sjms/tx/TransactedTopicProducerTest.java       |   2 +-
 .../integration/adapter/CamelTargetAdapter.java    |   4 -
 core/camel-core/readme-eip.adoc                    |   5 +-
 .../endpoint/dsl/AMQPEndpointBuilderFactory.java   | 118 --------------------
 .../dsl/ActiveMQEndpointBuilderFactory.java        | 120 ---------------------
 .../springboot/ActiveMQComponentConfiguration.java |  19 ----
 .../springboot/AMQPComponentConfiguration.java     |  19 ----
 .../camel/itest/greeter/JmsPrepareResponse.java    |   4 +-
 61 files changed, 149 insertions(+), 484 deletions(-)

diff --git a/components/camel-activemq/src/main/docs/activemq-component.adoc b/components/camel-activemq/src/main/docs/activemq-component.adoc
index 4faf25f..13784cb 100644
--- a/components/camel-activemq/src/main/docs/activemq-component.adoc
+++ b/components/camel-activemq/src/main/docs/activemq-component.adoc
@@ -44,7 +44,7 @@ activemq:foo
 === Component options
 
 // component options: START
-The ActiveMQ component supports 86 options, which are listed below.
+The ActiveMQ component supports 85 options, which are listed below.
 
 
 
@@ -112,7 +112,6 @@ The ActiveMQ component supports 86 options, which are listed below.
 | *requestTimeoutChecker Interval* (advanced) | Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. | 1000 | long
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *jmsOperations* (advanced) | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs. |  | JmsOperations
 | *destinationResolver* (advanced) | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
 | *replyToType* (producer) | Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel will use temporary queues. However if replyTo has been configured, then Shared is used by default. This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation for more details, and especially the notes about the implications if running  [...]
@@ -163,7 +162,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (93 parameters):
+==== Query Parameters (92 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -249,7 +248,6 @@ with the following path and query parameters:
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *useMessageIDAsCorrelation ID* (advanced) | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | boolean
 | *waitForProvisionCorrelation ToBeUpdatedCounter* (advanced) | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | int
 | *waitForProvisionCorrelation ToBeUpdatedThreadSleeping Time* (advanced) | Interval in millis to sleep each time while waiting for provisional correlation id to be updated. | 100 | long
@@ -281,7 +279,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 87 options, which are listed below.
+The component supports 86 options, which are listed below.
 
 
 
@@ -367,7 +365,6 @@ The component supports 87 options, which are listed below.
 | *camel.component.activemq.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.activemq.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this opti [...]
 | *camel.component.activemq.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the p [...]
-| *camel.component.activemq.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Ca [...]
 | *camel.component.activemq.trust-all-packages* | Define if all packages are trusted or not | false | Boolean
 | *camel.component.activemq.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.activemq.use-pooled-connection* | Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the Spring JmsTemplate which will create a new connection, session, producer for each message then close them all down again. The default value is true. Note that this requires an extra dependency on commons-pool2. | false | Boolean
diff --git a/components/camel-amqp/src/main/docs/amqp-component.adoc b/components/camel-amqp/src/main/docs/amqp-component.adoc
index 5994810..23675ad 100644
--- a/components/camel-amqp/src/main/docs/amqp-component.adoc
+++ b/components/camel-amqp/src/main/docs/amqp-component.adoc
@@ -36,7 +36,7 @@ xref:../../../../camel-jms/src/main/docs/readme.adoc[JMS] component after the de
 
 
 // component options: START
-The AMQP component supports 81 options, which are listed below.
+The AMQP component supports 80 options, which are listed below.
 
 
 
@@ -99,7 +99,6 @@ The AMQP component supports 81 options, which are listed below.
 | *requestTimeoutChecker Interval* (advanced) | Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. | 1000 | long
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *jmsOperations* (advanced) | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs. |  | JmsOperations
 | *destinationResolver* (advanced) | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
 | *replyToType* (producer) | Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel will use temporary queues. However if replyTo has been configured, then Shared is used by default. This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation for more details, and especially the notes about the implications if running  [...]
@@ -153,7 +152,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (93 parameters):
+==== Query Parameters (92 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -239,7 +238,6 @@ with the following path and query parameters:
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *useMessageIDAsCorrelation ID* (advanced) | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | boolean
 | *waitForProvisionCorrelation ToBeUpdatedCounter* (advanced) | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | int
 | *waitForProvisionCorrelation ToBeUpdatedThreadSleeping Time* (advanced) | Interval in millis to sleep each time while waiting for provisional correlation id to be updated. | 100 | long
@@ -270,7 +268,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 82 options, which are listed below.
+The component supports 81 options, which are listed below.
 
 
 
@@ -354,7 +352,6 @@ The component supports 82 options, which are listed below.
 | *camel.component.amqp.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.amqp.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option t [...]
 | *camel.component.amqp.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the paylo [...]
-| *camel.component.amqp.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel  [...]
 | *camel.component.amqp.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.amqp.username* | Username to use with the ConnectionFactory. You can also configure username/password directly on the ConnectionFactory. |  | String
 | *camel.component.amqp.wait-for-provision-correlation-to-be-updated-counter* | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | Integer
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
index 9381557..cad4692 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
@@ -327,12 +327,7 @@ public class CxfConsumer extends DefaultConsumer implements Suspendable {
         private void checkFailure(org.apache.camel.Exchange camelExchange, Exchange cxfExchange) throws Fault {
             final Throwable t;
             if (camelExchange.isFailed()) {
-                org.apache.camel.Message camelMsg = camelExchange.hasOut() ? camelExchange.getOut() : camelExchange.getIn();
-                if (camelMsg.isFault()) {
-                    t = camelMsg.getBody(Throwable.class);
-                } else {
-                    t = camelExchange.getException();
-                }
+                t = camelExchange.getException();
                 cxfExchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
                 if (t instanceof Fault) {
                     cxfExchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT);
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerFaultTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerFaultTest.java
index 24f36aa..652b01b 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerFaultTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerFaultTest.java
@@ -40,7 +40,6 @@ public class CxfConsumerFaultTest extends CxfConsumerPayloadFaultTest {
                         faultDetail.setPersonId("");
                         UnknownPersonFault fault = new UnknownPersonFault("Get the null value of person name", faultDetail);
                         exchange.getOut().setBody(fault);
-                        exchange.getOut().setFault(true);
                     }
                 });
                 
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadFaultMessageTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadFaultMessageTest.java
index e18de13..73c2bc7 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadFaultMessageTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadFaultMessageTest.java
@@ -46,7 +46,6 @@ public class CxfConsumerPayLoadFaultMessageTest extends CxfConsumerPayloadFaultT
                         outElements.add(details);
                         CxfPayload<SoapHeader> responsePayload = new CxfPayload<>(null, outElements);
                         exchange.getOut().setBody(responsePayload);
-                        exchange.getOut().setFault(true);
                     }
                 });
                 
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadMarshalFaultTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadMarshalFaultTest.java
index e843b44..477e401 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadMarshalFaultTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadMarshalFaultTest.java
@@ -51,7 +51,6 @@ public class CxfConsumerPayLoadMarshalFaultTest extends CxfConsumerPayloadFaultT
                         context.createMarshaller().marshal(unknowPersonFault, details);
                         fault.setDetail(details);
                         exchange.getOut().setBody(fault);
-                        exchange.getOut().setFault(true);
                     }
                 });
                 
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
index 8bb9a66..a883375 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
@@ -101,7 +101,6 @@ public class CxfCustomizedExceptionTest extends CamelTestSupport {
                             public void process(Exchange exchange) throws Exception {
                                 SoapFault fault =
                                     exchange.getProperty(Exchange.EXCEPTION_CAUGHT, SoapFault.class);
-                                exchange.getOut().setFault(true);
                                 exchange.getOut().setBody(fault);
                             }
                             
@@ -113,7 +112,6 @@ public class CxfCustomizedExceptionTest extends CamelTestSupport {
                 from(routerEndpointURI).process(new Processor() {
                     @Override
                     public void process(Exchange exchange) throws Exception {
-                        exchange.getMessage().setFault(true);
                         exchange.getMessage().setBody(SOAP_FAULT);
                     }
                 });
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageStreamExceptionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageStreamExceptionTest.java
index bba1c7b..afd5b91 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageStreamExceptionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageStreamExceptionTest.java
@@ -33,7 +33,6 @@ public class CxfMessageStreamExceptionTest extends CxfMessageCustomizedException
                         public void process(Exchange exchange) throws Exception {
                             SoapFault fault = exchange
                                 .getProperty(Exchange.EXCEPTION_CAUGHT, SoapFault.class);
-                            exchange.getOut().setFault(true);
                             exchange.getOut().setBody(fault);
                         }
 
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java
index b00300a..8a84359 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java
@@ -100,7 +100,6 @@ public class CxfSpringCustomizedExceptionTest extends CamelTestSupport  {
 
         @Override
         public void process(Exchange exchange) throws Exception {
-            exchange.getMessage().setFault(true);
             exchange.getMessage().setBody(SOAP_FAULT);
         }
     }
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java
index 317d924..af5b9b5 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java
@@ -255,12 +255,10 @@ public class CxfRsConsumerTest extends CamelTestSupport {
                     Response r = Response.status(404).entity("Can't found the customer with uri " + path)
                         .header("Content-Type", "text/plain").build();
                     exchange.getOut().setBody(r);
-                    exchange.getOut().setFault(true);
                 } else if ("/customerservice/customers/789".equals(path)) {
                     exchange.getOut().setBody("Can't found the customer with uri " + path);
                     exchange.getOut().setHeader(Exchange.CONTENT_TYPE, "text/plain");
                     exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, "404");                    
-                    exchange.getOut().setFault(true);
                 } else {
                     throw new RuntimeCamelException("Can't found the customer with uri " + path);
                 }
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/non_wrapper/PersonProcessor.java b/components/camel-cxf/src/test/java/org/apache/camel/non_wrapper/PersonProcessor.java
index 579ca11..eefff51 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/non_wrapper/PersonProcessor.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/non_wrapper/PersonProcessor.java
@@ -49,9 +49,6 @@ public class PersonProcessor implements Processor {
             personFault.setPersonId("");
             org.apache.camel.non_wrapper.UnknownPersonFault fault =
                 new org.apache.camel.non_wrapper.UnknownPersonFault("Get the null value of person name", personFault);
-            // Since camel has its own exception handler framework, we can't throw the exception to trigger it
-            // We just set the fault message in the exchange for camel-cxf component handling and return
-            exchange.getOut().setFault(true);
             exchange.getOut().setBody(fault);
             return;
         }
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/wsdl_first/PersonProcessor.java b/components/camel-cxf/src/test/java/org/apache/camel/wsdl_first/PersonProcessor.java
index 9bd5fcf..f8a77d9 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/wsdl_first/PersonProcessor.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/wsdl_first/PersonProcessor.java
@@ -52,9 +52,6 @@ public class PersonProcessor implements Processor {
             personFault.setPersonId("");
             org.apache.camel.wsdl_first.UnknownPersonFault fault =
                 new org.apache.camel.wsdl_first.UnknownPersonFault("Get the null value of person name", personFault);
-            // Since camel has its own exception handler framework, we can't throw the exception to trigger it
-            // We just set the fault message in the exchange for camel-cxf component handling and return
-            exchange.getOut().setFault(true);
             exchange.getOut().setBody(fault);
             return;
         }
diff --git a/components/camel-jms/src/main/docs/jms-component.adoc b/components/camel-jms/src/main/docs/jms-component.adoc
index 8e9e1ae..3e0b64f 100644
--- a/components/camel-jms/src/main/docs/jms-component.adoc
+++ b/components/camel-jms/src/main/docs/jms-component.adoc
@@ -435,7 +435,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 171 options, which are listed below.
+The component supports 169 options, which are listed below.
 
 
 
@@ -543,7 +543,6 @@ The component supports 171 options, which are listed below.
 | *camel.component.jms.configuration.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.jms.configuration.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled,  [...]
 | *camel.component.jms.configuration.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel kn [...]
-| *camel.component.jms.configuration.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on {@link org.apache.camel.Message#isFault()} will be send back in the response as a JMS header with the key {@link JmsConstants#JMS_TRANSFER_FAULT}. If the client is Camel, the returned fault flag will be set on the {@link org.apache.camel.Message#setFault(boolean)}. <p> You  [...]
 | *camel.component.jms.configuration.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.jms.configuration.username* | Username to use with the ConnectionFactory. You can also configure username/password directly on the ConnectionFactory. |  | String
 | *camel.component.jms.configuration.wait-for-provision-correlation-to-be-updated-counter* | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | Integer
@@ -608,7 +607,6 @@ The component supports 171 options, which are listed below.
 | *camel.component.jms.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.jms.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option ta [...]
 | *camel.component.jms.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloa [...]
-| *camel.component.jms.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel c [...]
 | *camel.component.jms.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.jms.username* | Username to use with the ConnectionFactory. You can also configure username/password directly on the ConnectionFactory. |  | String
 | *camel.component.jms.wait-for-provision-correlation-to-be-updated-counter* | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | Integer
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpReturnFaultTest.java b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpReturnFaultTest.java
deleted file mode 100644
index 27f5fb9..0000000
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpReturnFaultTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.netty4.http;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class NettyHttpReturnFaultTest extends BaseNettyTest {
-
-    @Test
-    public void testHttpFault() throws Exception {
-        Exchange exchange = template.request("netty4-http:http://localhost:{{port}}/test", new Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Hello World!");
-            }
-
-        });
-        assertTrue(exchange.isFailed());
-        NettyHttpOperationFailedException exception = exchange.getException(NettyHttpOperationFailedException.class);
-        assertNotNull(exception);
-        assertEquals(500, exception.getStatusCode());
-        String message = exception.getContentAsString();
-        assertEquals("This is a fault", message);
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("netty4-http:http://localhost:{{port}}/test")
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                exchange.getOut().setFault(true);
-                                exchange.getOut().setBody("This is a fault");
-                            }
-                        });
-            }
-        };
-    }
-}
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/SnapshotProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/SnapshotProducer.java
index 02b5ae3..e236e39 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/SnapshotProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/SnapshotProducer.java
@@ -90,7 +90,7 @@ public class SnapshotProducer extends AbstractOpenstackProducer {
         StringHelper.notEmpty(id, "Cinder Snapshot ID");
 
         final ActionResponse out = os.blockStorage().snapshots().update(id, vs.getName(), vs.getDescription());
-        checkFailure(out, msg, "Update volume snapshot " + id);
+        checkFailure(out, exchange, "Update volume snapshot " + id);
     }
 
     private void doDelete(Exchange exchange) {
@@ -99,7 +99,7 @@ public class SnapshotProducer extends AbstractOpenstackProducer {
         StringHelper.notEmpty(id, "Cinder Snapshot ID");
 
         final ActionResponse out = os.blockStorage().snapshots().delete(id);
-        checkFailure(out, msg, "Delete snapshot " + id);
+        checkFailure(out, exchange, "Delete snapshot " + id);
     }
 
     private VolumeSnapshot messageToSnapshot(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/VolumeProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/VolumeProducer.java
index bc6b961..37d7f04 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/VolumeProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/cinder/producer/VolumeProducer.java
@@ -100,7 +100,7 @@ public class VolumeProducer extends AbstractOpenstackProducer {
         StringHelper.notEmpty(vol.getDescription(), "Cinder Volume Description");
         StringHelper.notEmpty(vol.getName(), "Cinder Volume Name");
         final ActionResponse out = os.blockStorage().volumes().update(id, vol.getName(), vol.getDescription());
-        checkFailure(out, msg, "Update volume " + id);
+        checkFailure(out, exchange, "Update volume " + id);
     }
 
     private void doDelete(Exchange exchange) {
@@ -108,7 +108,7 @@ public class VolumeProducer extends AbstractOpenstackProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(CinderConstants.VOLUME_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Cinder Volume ID");
         final ActionResponse out = os.blockStorage().volumes().delete(id);
-        checkFailure(out, msg, "Delete volume " + id);
+        checkFailure(out, exchange, "Delete volume " + id);
     }
 
     private Volume messageToVolume(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
index 96bec2f..9d424e7 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/AbstractOpenstackProducer.java
@@ -73,10 +73,9 @@ public abstract class AbstractOpenstackProducer extends DefaultProducer {
         return operation;
     }
 
-    protected void checkFailure(ActionResponse response, Message msg, String operation) {
-        msg.setFault(!response.isSuccess());
+    protected void checkFailure(ActionResponse response, Exchange exchange, String operation) {
         if (!response.isSuccess()) {
-            msg.setBody(String.format(" %s was not successful: %s", operation, response.getFault()));
+            exchange.setException(new OpenstackOperationException(operation, response.getFault(), response.getCode()));
         }
     }
 }
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/OpenstackException.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/OpenstackException.java
new file mode 100644
index 0000000..6466dff
--- /dev/null
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/OpenstackException.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.openstack.common;
+
+import org.apache.camel.Exchange;
+
+public class OpenstackException extends Exception {
+
+    public OpenstackException(String message) {
+        super(message);
+    }
+}
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/OpenstackOperationException.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/OpenstackOperationException.java
new file mode 100644
index 0000000..5a0e86f
--- /dev/null
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/common/OpenstackOperationException.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.openstack.common;
+
+public class OpenstackOperationException extends OpenstackException {
+
+    private String operation;
+    private String fault;
+    private int code;
+
+    public OpenstackOperationException(String operation, String fault, int code) {
+        super(String.format("%s was not successful: %s (%s)", operation, fault, code));
+        this.operation = operation;
+        this.fault = fault;
+        this.code = code;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public String getFault() {
+        return fault;
+    }
+
+    public int getCode() {
+        return code;
+    }
+}
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/glance/GlanceProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/glance/GlanceProducer.java
index bf5be4dc..0a86f0d 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/glance/GlanceProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/glance/GlanceProducer.java
@@ -120,7 +120,7 @@ public class GlanceProducer extends AbstractOpenstackProducer {
         final String imageId = msg.getHeader(OpenstackConstants.ID, String.class);
         StringHelper.notEmpty(imageId, "ImageID");
         final ActionResponse response = os.compute().images().delete(imageId);
-        checkFailure(response, msg, "Delete image " + imageId);
+        checkFailure(response, exchange, "Delete image " + imageId);
     }
 
     private Image messageToImage(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
index 5c49056..638c9af 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/DomainProducer.java
@@ -92,7 +92,7 @@ public class DomainProducer extends AbstractKeystoneProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(KeystoneConstants.DOMAIN_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Domain ID");
         final ActionResponse response = osV3Client.identity().domains().delete(id);
-        checkFailure(response, msg, "Delete domain" + id);
+        checkFailure(response, exchange, "Delete domain" + id);
     }
 
     private Domain messageToDomain(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
index 276225a..d56f6b7 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/GroupProducer.java
@@ -101,7 +101,7 @@ public class GroupProducer extends AbstractKeystoneProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(KeystoneConstants.GROUP_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Group ID");
         final ActionResponse response = osV3Client.identity().groups().delete(id);
-        checkFailure(response, msg, "Delete group with ID " + id);
+        checkFailure(response, exchange, "Delete group with ID " + id);
     }
 
     private void doAddUser(Exchange exchange) {
@@ -111,7 +111,7 @@ public class GroupProducer extends AbstractKeystoneProducer {
         StringHelper.notEmpty(userId, "User ID");
         StringHelper.notEmpty(groupId, "Group ID");
         final ActionResponse response = osV3Client.identity().groups().addUserToGroup(groupId, userId);
-        checkFailure(response, msg, String.format("Add user %s to group %s", userId, groupId));
+        checkFailure(response, exchange, String.format("Add user %s to group %s", userId, groupId));
     }
 
     private void doCheckUserGroup(Exchange exchange) {
@@ -131,7 +131,7 @@ public class GroupProducer extends AbstractKeystoneProducer {
         StringHelper.notEmpty(userId, "User ID");
         StringHelper.notEmpty(groupId, "Group ID");
         final ActionResponse response = osV3Client.identity().groups().removeUserFromGroup(groupId, userId);
-        checkFailure(response, msg, String.format("Delete user %s from group %s", userId, groupId));
+        checkFailure(response, exchange, String.format("Delete user %s from group %s", userId, groupId));
     }
 
     private Group messageToGroup(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
index c00ac8e..323d057 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/ProjectProducer.java
@@ -92,7 +92,7 @@ public class ProjectProducer extends AbstractKeystoneProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, String.class);
         StringHelper.notEmpty(id, "Project ID");
         final ActionResponse response = osV3Client.identity().projects().delete(id);
-        checkFailure(response, msg, "Delete project with ID " + id);
+        checkFailure(response, exchange, "Delete project with ID " + id);
     }
 
     private Project messageToProject(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
index 0d1008b..e9a57cd 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/RegionProducer.java
@@ -91,7 +91,7 @@ public class RegionProducer extends AbstractKeystoneProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, String.class);
         StringHelper.notEmpty(id, "Region ID");
         final ActionResponse response = osV3Client.identity().regions().delete(id);
-        checkFailure(response, msg, "Delete network" + id);
+        checkFailure(response, exchange, "Delete network" + id);
     }
 
     private Region messageToRegion(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
index c41dfb5..c4ba85c 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/keystone/producer/UserProducer.java
@@ -92,7 +92,7 @@ public class UserProducer extends AbstractKeystoneProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(KeystoneConstants.USER_ID, String.class), String.class);
         StringHelper.notEmpty(id, "User ID");
         final ActionResponse response = osV3Client.identity().users().delete(id);
-        checkFailure(response, msg, "Delete user with ID " + id);
+        checkFailure(response, exchange, "Delete user with ID " + id);
     }
 
     private User messageToUser(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
index 320e957..185dca8 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/NetworkProducer.java
@@ -84,7 +84,7 @@ public class NetworkProducer extends AbstractOpenstackProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NeutronConstants.NETWORK_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Network ID");
         final ActionResponse response = os.networking().network().delete(id);
-        checkFailure(response, msg, "Delete network" + id);
+        checkFailure(response, exchange, "Delete network" + id);
     }
 
     private Network messageToNetwork(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
index 3abd2fa..797ee26 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/PortProducer.java
@@ -93,7 +93,7 @@ public class PortProducer extends AbstractOpenstackProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NeutronConstants.PORT_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Port ID");
         final ActionResponse response = os.networking().port().delete(id);
-        checkFailure(response, msg, "Delete port with ID " + id);
+        checkFailure(response, exchange, "Delete port with ID " + id);
     }
 
     private Port messageToPort(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
index 9d4e372..060b335 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/RouterProducer.java
@@ -102,7 +102,7 @@ public class RouterProducer extends AbstractOpenstackProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NeutronConstants.ROUTER_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Router ID");
         final ActionResponse response = os.networking().router().delete(id);
-        checkFailure(response, msg, "Delete router with ID " + id);
+        checkFailure(response, exchange, "Delete router with ID " + id);
     }
 
     private void doDetach(Exchange exchange) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/SubnetProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/SubnetProducer.java
index c4a602f..6b753ee 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/SubnetProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/neutron/producer/SubnetProducer.java
@@ -86,7 +86,7 @@ public class SubnetProducer extends AbstractOpenstackProducer {
         final String id = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NeutronConstants.SUBNET_ID, String.class), String.class);
         StringHelper.notEmpty(id, "Subnet ID");
         final ActionResponse response = os.networking().subnet().delete(id);
-        checkFailure(response, msg, "Delete network " + id);
+        checkFailure(response, exchange, "Delete network " + id);
     }
 
 
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/FlavorsProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/FlavorsProducer.java
index 89dc344..8478f04 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/FlavorsProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/FlavorsProducer.java
@@ -83,7 +83,7 @@ public class FlavorsProducer extends AbstractOpenstackProducer {
         final String flavorId = msg.getHeader(OpenstackConstants.ID, msg.getHeader(NovaConstants.FLAVOR_ID, String.class), String.class);
         StringHelper.notEmpty(flavorId, "FlavorID");
         final ActionResponse response = os.compute().flavors().delete(flavorId);
-        checkFailure(response, msg, "Delete flavor");
+        checkFailure(response, exchange, "Delete flavor");
     }
 
     private org.openstack4j.model.compute.Flavor messageToFlavor(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/KeypairProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/KeypairProducer.java
index 908cf0f..0550efd 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/KeypairProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/KeypairProducer.java
@@ -84,7 +84,7 @@ public class KeypairProducer extends AbstractOpenstackProducer {
         final String keypairName = msg.getHeader(OpenstackConstants.NAME, String.class);
         StringHelper.notEmpty(keypairName, "Keypair name");
         final ActionResponse response = os.compute().keypairs().delete(keypairName);
-        checkFailure(response, msg, "Delete keypair " + keypairName);
+        checkFailure(response, exchange, "Delete keypair " + keypairName);
     }
 
 }
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/ServerProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/ServerProducer.java
index c5d54b2..c137ff5 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/ServerProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/nova/producer/ServerProducer.java
@@ -111,7 +111,7 @@ public class ServerProducer extends AbstractOpenstackProducer {
         ObjectHelper.notNull(action, "Server action");
         StringHelper.notEmpty(serverId, "Server ID");
         final ActionResponse response = os.compute().servers().action(serverId, action);
-        checkFailure(response, msg, "Performing action " + action.name());
+        checkFailure(response, exchange, "Performing action " + action.name());
     }
 
     private void doDelete(Exchange exchange) {
@@ -119,7 +119,7 @@ public class ServerProducer extends AbstractOpenstackProducer {
         final String serverId = msg.getHeader(OpenstackConstants.ID, String.class);
         StringHelper.notEmpty(serverId, "Server ID");
         final ActionResponse response = os.compute().servers().delete(serverId);
-        checkFailure(response, msg, "Delete server with ID " + serverId);
+        checkFailure(response, exchange, "Delete server with ID " + serverId);
     }
 
     private ServerCreate messageToServer(Message message) {
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java
index b23ab7e..4845c6b 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ContainerProducer.java
@@ -23,6 +23,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.common.AbstractOpenstackProducer;
 import org.apache.camel.component.openstack.common.OpenstackConstants;
+import org.apache.camel.component.openstack.common.OpenstackException;
 import org.apache.camel.component.openstack.swift.SwiftConstants;
 import org.apache.camel.component.openstack.swift.SwiftEndpoint;
 import org.apache.camel.util.StringHelper;
@@ -80,7 +81,7 @@ public class ContainerProducer extends AbstractOpenstackProducer {
 
         final CreateUpdateContainerOptions options = messageToCreateUpdateOptions(msg);
         final ActionResponse out = os.objectStorage().containers().create(name, options);
-        checkFailure(out, msg, "Create container " + name);
+        checkFailure(out, exchange, "Create container " + name);
     }
 
     private void doGet(Exchange exchange) {
@@ -102,7 +103,7 @@ public class ContainerProducer extends AbstractOpenstackProducer {
         StringHelper.notEmpty(name, "Container name");
         final CreateUpdateContainerOptions options = messageToCreateUpdateOptions(msg);
         final ActionResponse out = os.objectStorage().containers().update(name, options);
-        checkFailure(out, msg, "Update container " + name);
+        checkFailure(out, exchange, "Update container " + name);
     }
 
     private void doDelete(Exchange exchange) {
@@ -110,7 +111,7 @@ public class ContainerProducer extends AbstractOpenstackProducer {
         final String name = msg.getHeader(OpenstackConstants.NAME, msg.getHeader(SwiftConstants.CONTAINER_NAME, String.class), String.class);
         StringHelper.notEmpty(name, "Container name");
         final ActionResponse out = os.objectStorage().containers().delete(name);
-        checkFailure(out, msg, "Delete container " + name);
+        checkFailure(out, exchange, "Delete container " + name);
     }
 
     private void doGetMetadata(Exchange exchange) {
@@ -125,9 +126,8 @@ public class ContainerProducer extends AbstractOpenstackProducer {
         final String name = msg.getHeader(OpenstackConstants.NAME, msg.getHeader(SwiftConstants.CONTAINER_NAME, String.class), String.class);
         StringHelper.notEmpty(name, "Container name");
         boolean success = os.objectStorage().containers().deleteMetadata(name, msg.getBody(Map.class));
-        msg.setFault(!success);
         if (!success) {
-            msg.setBody("Removing metadata was not successful");
+            exchange.setException(new OpenstackException("Removing metadata was not successful"));
         }
     }
 
@@ -136,9 +136,8 @@ public class ContainerProducer extends AbstractOpenstackProducer {
         final String name = msg.getHeader(OpenstackConstants.NAME, msg.getHeader(SwiftConstants.CONTAINER_NAME, String.class), String.class);
         StringHelper.notEmpty(name, "Container name");
         boolean success = os.objectStorage().containers().updateMetadata(name, msg.getBody(Map.class));
-        msg.setFault(!success);
         if (!success) {
-            msg.setBody("Updating metadata was not successful");
+            exchange.setException(new OpenstackException("Updating metadata was not successful"));
         }
     }
 
diff --git a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ObjectProducer.java b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ObjectProducer.java
index 411db32..562c6eb 100644
--- a/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ObjectProducer.java
+++ b/components/camel-openstack/src/main/java/org/apache/camel/component/openstack/swift/producer/ObjectProducer.java
@@ -23,6 +23,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.openstack.common.AbstractOpenstackProducer;
 import org.apache.camel.component.openstack.common.OpenstackConstants;
+import org.apache.camel.component.openstack.common.OpenstackException;
 import org.apache.camel.component.openstack.swift.SwiftConstants;
 import org.apache.camel.component.openstack.swift.SwiftEndpoint;
 import org.apache.camel.util.StringHelper;
@@ -102,8 +103,7 @@ public class ObjectProducer extends AbstractOpenstackProducer {
         StringHelper.notEmpty(containerName, "Container name");
         StringHelper.notEmpty(objectName, "Object name");
         final ActionResponse out = os.objectStorage().objects().delete(containerName, objectName);
-        msg.setBody(out.getFault());
-        msg.setFault(!out.isSuccess());
+        checkFailure(out, exchange, "Delete container");
     }
 
     private void doGetMetadata(Exchange exchange) {
@@ -123,9 +123,8 @@ public class ObjectProducer extends AbstractOpenstackProducer {
         StringHelper.notEmpty(containerName, "Container name");
         StringHelper.notEmpty(objectName, "Object name");
         final boolean success = os.objectStorage().objects().updateMetadata(ObjectLocation.create(containerName, objectName), msg.getBody(Map.class));
-        msg.setFault(!success);
         if (!success) {
-            msg.setBody("Updating metadata was not successful");
+            exchange.setException(new OpenstackException("Updating metadata was not successful"));
         }
     }
 }
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java
index 8a822e1..adff34a 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java
@@ -110,7 +110,6 @@ public class VolumeProducerTest extends CinderProducerTestSupport {
         assertEquals(id, idCaptor.getValue());
         assertEquals(name, nameCaptor.getValue());
         assertEquals(desc, descCaptor.getValue());
-        assertFalse(msg.isFault());
         assertNull(msg.getBody());
     }
 
@@ -126,8 +125,8 @@ public class VolumeProducerTest extends CinderProducerTestSupport {
 
         producer.process(exchange);
 
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(faultMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(faultMessage));
     }
 
     @Test
@@ -150,8 +149,6 @@ public class VolumeProducerTest extends CinderProducerTestSupport {
 
         verify(volumeService).delete(captor.capture());
         assertEquals(id, captor.getValue());
-
-        assertFalse(msg.isFault());
     }
 
     private void assertEqualVolumes(Volume old, Volume newVolume) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeSnapshotProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeSnapshotProducerTest.java
index 0cfdd8f..e88e2dc 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeSnapshotProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeSnapshotProducerTest.java
@@ -108,7 +108,6 @@ public class VolumeSnapshotProducerTest extends CinderProducerTestSupport {
         assertEquals(id, idCaptor.getValue());
         assertEquals(name, nameCaptor.getValue());
         assertEquals(desc, descCaptor.getValue());
-        assertFalse(msg.isFault());
         assertNull(msg.getBody());
     }
 
@@ -133,7 +132,6 @@ public class VolumeSnapshotProducerTest extends CinderProducerTestSupport {
 
         verify(snapshotService).delete(captor.capture());
         assertEquals(id, captor.getValue());
-        assertFalse(msg.isFault());
     }
 
     private void assertEqualsVolumeSnapshots(VolumeSnapshot old, VolumeSnapshot newVolumeSn) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java
index 05cbf0b..2e3b871 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java
@@ -152,14 +152,13 @@ public class DomainProducerTest extends KeystoneProducerTestSupport {
 
         verify(domainService).delete(domainIdCaptor.capture());
         assertEquals(networkID, domainIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(domainService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsDomain(Domain old, Domain newDomain) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java
index f108386..f8d4ca1 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java
@@ -153,14 +153,13 @@ public class GroupProducerTest extends KeystoneProducerTestSupport {
 
         verify(groupService).delete(groupIdCaptor.capture());
         assertEquals(networkID, groupIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(groupService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsGroup(Group old, Group newGroup) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java
index cc3267c..00e40c1 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java
@@ -155,14 +155,13 @@ public class ProjectProducerTest extends KeystoneProducerTestSupport {
 
         verify(projectService).delete(projectIdCaptor.capture());
         assertEquals(networkID, projectIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(projectService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsProject(Project old, Project newProject) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java
index 2bc3734..3fc8fa0 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java
@@ -149,14 +149,13 @@ public class RegionProducerTest extends KeystoneProducerTestSupport {
 
         verify(regionService).delete(regionIdCaptor.capture());
         assertEquals(networkID, regionIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(regionService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsRegion(Region old, Region newRegion) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java
index 918c85e..1228f16 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java
@@ -157,14 +157,13 @@ public class UserProducerTest extends KeystoneProducerTestSupport {
 
         verify(userService).delete(userIdCaptor.capture());
         assertEquals(networkID, userIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(userService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsUser(User old, User newUser) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java
index b911a6e..32697b0 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java
@@ -133,14 +133,13 @@ public class NetworkProducerTest extends NeutronProducerTestSupport {
 
         verify(networkService).delete(networkIdCaptor.capture());
         assertEquals(networkID, networkIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(networkService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private Network createNetwork() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java
index 9d0c46c..0fbe05d 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java
@@ -154,14 +154,13 @@ public class PortProducerTest extends NeutronProducerTestSupport {
 
         verify(portService).delete(portIdCaptor.capture());
         assertEquals(portID, portIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(portService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private Port createPort() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java
index ebf7e77..a950509 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java
@@ -162,14 +162,13 @@ public class RouterProducerTest extends NeutronProducerTestSupport {
 
         verify(routerService).delete(routerIdCaptor.capture());
         assertEquals(routerID, routerIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(routerService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     @Test
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java
index 2f25c3b..eff4fb4 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java
@@ -132,14 +132,13 @@ public class SubnetProducerTest extends NeutronProducerTestSupport {
 
         verify(subnetService).delete(subnetIdCaptor.capture());
         assertEquals(subnetID, subnetIdCaptor.getValue());
-        assertFalse(msg.isFault());
 
         //in case of failure
         final String failureMessage = "fail";
         when(subnetService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failureMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private Subnet createSubnet() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java
index d92f3f2..0aa83f5 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java
@@ -164,7 +164,6 @@ public class FlavorProducerTest extends NovaProducerTestSupport {
         verify(flavorService).delete(flavorIdCaptor.capture());
         assertEquals(id, flavorIdCaptor.getValue());
 
-        assertFalse(msg.isFault());
         assertNull(msg.getBody());
     }
 
@@ -180,8 +179,8 @@ public class FlavorProducerTest extends NovaProducerTestSupport {
         verify(flavorService).delete(flavorIdCaptor.capture());
         assertEquals(id, flavorIdCaptor.getValue());
 
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failReason));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failReason));
     }
 
     private Flavor createTestFlavor() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java
index 429f315..768b9e0 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java
@@ -120,15 +120,14 @@ public class ServerProducerTest extends NovaProducerTestSupport {
 
         assertEquals(id, idArgumentCaptor.getValue());
         assertTrue(actionArgumentCaptor.getValue() == Action.PAUSE);
-        assertFalse(msg.isFault());
         assertNull(msg.getBody());
 
         //test fail
         final String failReason = "fr";
         when(serverService.action(anyString(), any())).thenReturn(ActionResponse.actionFailed(failReason, 401));
         producer.process(exchange);
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failReason));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failReason));
     }
 
     @Test
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java
index 34f359a..c9327e6 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java
@@ -91,8 +91,6 @@ public class ContainerProducerTest extends SwiftProducerTestSupport {
         verify(containerService).create(containerNameCaptor.capture(), optionsCaptor.capture());
         assertEquals(CONTAINER_NAME, containerNameCaptor.getValue());
         assertNull(optionsCaptor.getValue());
-
-        assertFalse(msg.isFault());
     }
 
     @Test
@@ -107,7 +105,6 @@ public class ContainerProducerTest extends SwiftProducerTestSupport {
         verify(containerService).create(containerNameCaptor.capture(), optionsCaptor.capture());
         assertEquals(CONTAINER_NAME, containerNameCaptor.getValue());
         assertEquals(options, optionsCaptor.getValue());
-        assertFalse(msg.isFault());
     }
 
     @Test
@@ -152,8 +149,6 @@ public class ContainerProducerTest extends SwiftProducerTestSupport {
 
         verify(containerService).delete(containerNameCaptor.capture());
         assertEquals(CONTAINER_NAME, containerNameCaptor.getValue());
-
-        assertFalse(msg.isFault());
     }
 
     @Test
@@ -165,8 +160,8 @@ public class ContainerProducerTest extends SwiftProducerTestSupport {
 
         producer.process(exchange);
 
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failMessage));
     }
 
     @Test
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java
index d5767c4..2add89d 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java
@@ -41,7 +41,6 @@ import org.openstack4j.model.storage.object.SwiftObject;
 import org.openstack4j.model.storage.object.options.ObjectLocation;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyString;
@@ -145,11 +144,8 @@ public class ObjectProducerTest extends SwiftProducerTestSupport {
         verify(objectService).delete(containerNameCaptor.capture(), objectNameCaptor.capture());
         assertEquals(CONTAINER_NAME, containerNameCaptor.getValue());
         assertEquals(OBJECT_NAME, objectNameCaptor.getValue());
-
-        assertFalse(msg.isFault());
     }
 
-
     @Test
     public void deleteObjectFailTest() throws Exception {
         final String failMessage = "fail";
@@ -160,8 +156,8 @@ public class ObjectProducerTest extends SwiftProducerTestSupport {
 
         producer.process(exchange);
 
-        assertTrue(msg.isFault());
-        assertTrue(msg.getBody(String.class).contains(failMessage));
+        assertTrue(msg.getExchange().isFailed());
+        assertTrue(msg.getExchange().getException().getMessage().contains(failMessage));
     }
 
     @Test
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index e323b28..dc7e0ec 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -398,17 +398,13 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
             // 500 for internal server error which can be overridden by response code in header
             response.setStatus(Status.valueOf(500));
             Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-            if (msg.isFault()) {
-                out = msg;
-            } else {
-                // print exception as message and stacktrace
-                Exception t = exchange.getException();
-                StringWriter sw = new StringWriter();
-                PrintWriter pw = new PrintWriter(sw);
-                t.printStackTrace(pw);
-                response.setEntity(sw.toString(), MediaType.TEXT_PLAIN);
-                return;
-            }
+            // print exception as message and stacktrace
+            Exception t = exchange.getException();
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            t.printStackTrace(pw);
+            response.setEntity(sw.toString(), MediaType.TEXT_PLAIN);
+            return;
         } else {
             out = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
         }
diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsMessage.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsMessage.java
index 2d8bc48..548b7c8 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsMessage.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsMessage.java
@@ -96,7 +96,6 @@ public class SjmsMessage extends DefaultMessage {
 
         // copy body and fault flag
         setBody(that.getBody());
-        setFault(that.isFault());
 
         // we have already cleared the headers
         if (that.hasHeaders()) {
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedConsumerSupport.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedConsumerSupport.java
index 620046c..59caa47 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedConsumerSupport.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedConsumerSupport.java
@@ -109,7 +109,7 @@ public abstract class TransactedConsumerSupport extends CamelTestSupport {
                             public void process(Exchange exchange) throws Exception {
                                 if (counter.incrementAndGet() == maxAttemptsCount) {
                                     log.info("{} Messages have been processed. Failing the exchange to force a rollback of the transaction.", maxAttemptsCount);
-                                    exchange.getOut().setFault(true);
+                                    throw new IllegalArgumentException("Forced rollback");
                                 }
                                 
                                 // Countdown the latch
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java
index bd497a6..0c8257f 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java
@@ -87,8 +87,8 @@ public class TransactedQueueProducerTest extends CamelTestSupport {
                             @Override
                             public void process(Exchange exchange) throws Exception {
                                 if (exchange.getIn().getHeader("isfailed", Boolean.class)) {
-                                    log.info("We failed.  Should roll back.");
-                                    exchange.getOut().setFault(true);
+                                    log.info("We failed. Should roll back.");
+                                    throw new IllegalArgumentException("Forced error");
                                 } else {
                                     log.info("We passed.  Should commit.");
                                 }
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java
index 4a7c656..540df18 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java
@@ -93,7 +93,7 @@ public class TransactedTopicProducerTest extends CamelTestSupport {
                             public void process(Exchange exchange) throws Exception {
                                 if (exchange.getIn().getHeader("isfailed", Boolean.class)) {
                                     log.info("We failed.  Should roll back.");
-                                    exchange.getOut().setFault(true);
+                                    throw new IllegalArgumentException("Forced error");
                                 } else {
                                     log.info("We passed.  Should commit.");
                                 }
diff --git a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java
index cb04670..2117f1c 100644
--- a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java
+++ b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapter.java
@@ -71,10 +71,6 @@ public class CamelTargetAdapter extends AbstractCamelAdapter implements MessageH
         Exchange inExchange = new DefaultExchange(getCamelContext(), pattern);
         SpringIntegrationBinding.storeToCamelMessage(message, inExchange.getIn());
         Exchange outExchange = getCamelTemplate().send(getCamelEndpointUri(), inExchange);
-        org.apache.camel.Message camelMsg = outExchange.hasOut() ? outExchange.getOut() : outExchange.getIn();
-        if (camelMsg.isFault()) {
-            result = true;
-        }
 
         Message<?> response;
         if (isExpectReply()) {
diff --git a/core/camel-core/readme-eip.adoc b/core/camel-core/readme-eip.adoc
index eec89e2..74e6852 100644
--- a/core/camel-core/readme-eip.adoc
+++ b/core/camel-core/readme-eip.adoc
@@ -3,7 +3,7 @@
 Camel supports most of the link:http://www.eaipatterns.com/toc.html[Enterprise Integration Patterns] from the excellent book by link:http://www.amazon.com/exec/obidos/search-handle-url/105-9796798-8100401?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Gregor%20Hohpe[Gregor Hohpe] and link:http://www.amazon.com/exec/obidos/search-handle-url/105-9796798-8100401?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Bobby%20Woolf[Bobby Woolf].
 
 // eips: START
-Number of EIPs: 63 (0 deprecated)
+Number of EIPs: 62 (0 deprecated)
 
 [width="100%",cols="4,6",options="header"]
 |===
@@ -138,9 +138,6 @@ Number of EIPs: 63 (0 deprecated)
 | link:src/main/docs/eips/setBody-eip.adoc[Set Body] +
 `<setBody>` | Sets the contents of the message body
 
-| link:src/main/docs/eips/setFaultBody-eip.adoc[Set Fault Body] +
-`<setFaultBody>` | Sets the contents of a fault message's body
-
 | link:src/main/docs/eips/setHeader-eip.adoc[Set Header] +
 `<setHeader>` | Sets the value of a message header
 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
index 87dacfe..fd25f75 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/AMQPEndpointBuilderFactory.java
@@ -1828,46 +1828,6 @@ public interface AMQPEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedAMQPEndpointConsumerBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedAMQPEndpointConsumerBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
@@ -3756,46 +3716,6 @@ public interface AMQPEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedAMQPEndpointProducerBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedAMQPEndpointProducerBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
@@ -4994,44 +4914,6 @@ public interface AMQPEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedAMQPEndpointBuilder transferFault(boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedAMQPEndpointBuilder transferFault(String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
index fa120ca..f1c79dd 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
@@ -1834,46 +1834,6 @@ public interface ActiveMQEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedActiveMQEndpointConsumerBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedActiveMQEndpointConsumerBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
@@ -3768,46 +3728,6 @@ public interface ActiveMQEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedActiveMQEndpointProducerBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedActiveMQEndpointProducerBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
@@ -5015,46 +4935,6 @@ public interface ActiveMQEndpointBuilderFactory {
             return this;
         }
         /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedActiveMQEndpointBuilder transferFault(
-                boolean transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
-         * If enabled and you are using Request Reply messaging (InOut) and an
-         * Exchange failed with a SOAP fault (not exception) on the consumer
-         * side, then the fault flag on org.apache.camel.Message#isFault() will
-         * be send back in the response as a JMS header with the key
-         * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-         * fault flag will be set on the
-         * org.apache.camel.Message#setFault(boolean). You may want to enable
-         * this when using Camel components that support faults such as SOAP
-         * based such as cxf or spring-ws.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: advanced
-         */
-        default AdvancedActiveMQEndpointBuilder transferFault(
-                String transferFault) {
-            setProperty("transferFault", transferFault);
-            return this;
-        }
-        /**
          * Specifies whether JMSMessageID should always be used as
          * JMSCorrelationID for InOut messages.
          * 
diff --git a/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java
index d429554..1206a92 100644
--- a/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-activemq-starter/src/main/java/org/apache/camel/component/activemq/springboot/ActiveMQComponentConfiguration.java
@@ -445,17 +445,6 @@ public class ActiveMQComponentConfiguration
      */
     private Boolean transferException = false;
     /**
-     * If enabled and you are using Request Reply messaging (InOut) and an
-     * Exchange failed with a SOAP fault (not exception) on the consumer side,
-     * then the fault flag on org.apache.camel.Message#isFault() will be send
-     * back in the response as a JMS header with the key
-     * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-     * fault flag will be set on the org.apache.camel.Message#setFault(boolean).
-     * You may want to enable this when using Camel components that support
-     * faults such as SOAP based such as cxf or spring-ws.
-     */
-    private Boolean transferFault = false;
-    /**
      * Allows you to use your own implementation of the
      * org.springframework.jms.core.JmsOperations interface. Camel uses
      * JmsTemplate as default. Can be used for testing purpose, but not used
@@ -1152,14 +1141,6 @@ public class ActiveMQComponentConfiguration
         this.transferException = transferException;
     }
 
-    public Boolean getTransferFault() {
-        return transferFault;
-    }
-
-    public void setTransferFault(Boolean transferFault) {
-        this.transferFault = transferFault;
-    }
-
     public String getJmsOperations() {
         return jmsOperations;
     }
diff --git a/platforms/spring-boot/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java
index 25c2592..2d7397f 100644
--- a/platforms/spring-boot/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-amqp-starter/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java
@@ -411,17 +411,6 @@ public class AMQPComponentConfiguration
      */
     private Boolean transferException = false;
     /**
-     * If enabled and you are using Request Reply messaging (InOut) and an
-     * Exchange failed with a SOAP fault (not exception) on the consumer side,
-     * then the fault flag on org.apache.camel.Message#isFault() will be send
-     * back in the response as a JMS header with the key
-     * JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned
-     * fault flag will be set on the org.apache.camel.Message#setFault(boolean).
-     * You may want to enable this when using Camel components that support
-     * faults such as SOAP based such as cxf or spring-ws.
-     */
-    private Boolean transferFault = false;
-    /**
      * Allows you to use your own implementation of the
      * org.springframework.jms.core.JmsOperations interface. Camel uses
      * JmsTemplate as default. Can be used for testing purpose, but not used
@@ -1078,14 +1067,6 @@ public class AMQPComponentConfiguration
         this.transferException = transferException;
     }
 
-    public Boolean getTransferFault() {
-        return transferFault;
-    }
-
-    public void setTransferFault(Boolean transferFault) {
-        this.transferFault = transferFault;
-    }
-
     public String getJmsOperations() {
         return jmsOperations;
     }
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
index 7553e52..e779bbe 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
@@ -35,9 +35,7 @@ public class JmsPrepareResponse implements Processor {
             FaultDetail faultDetail = new FaultDetail();
             faultDetail.setMajor((short)2);
             faultDetail.setMinor((short)1);
-            exchange.getOut().setBody(new PingMeFault("PingMeFault raised by server", faultDetail));
-            exchange.getOut().setFault(true);
-            
+            exchange.getOut().setBody(new PingMeFault("PingMeFault raised by server", faultDetail));          
         }
     }
 }


[camel] 03/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e76b1672f7e1d4d8ad963832ab81cb1d2c0f24a4
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Jul 20 12:05:00 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../component/cxf/CxfCustomizedExceptionTest.java  |  8 ++-
 .../cxf/CxfSpringCustomizedExceptionTest.java      | 12 +++-
 .../cxf/CxfCustomizedExceptionContext.xml          | 34 ++++++------
 .../SplitterAndExceptionRouteTwistIssueTest.java   |  2 -
 .../jms/issues/BruceHandlingBeanExceptionTest.java | 10 +---
 .../mina2/Mina2TransferExchangeOptionTest.java     |  9 +--
 .../mina2/Mina2VMTransferExchangeOptionTest.java   |  9 +--
 .../netty4/NettyTransferExchangeOptionTest.java    |  9 +--
 .../spring/processor/SpringSetFaultBodyTest.java   | 46 ----------------
 .../spring/processor/SpringSetFaultBodyTest.xml    | 37 -------------
 .../apache/camel/model/SetFaultBodyDefinition.java | 64 ----------------------
 .../org/apache/camel/reifier/ProcessorReifier.java |  1 -
 .../modules/ROOT/pages/language-component.adoc     |  2 +-
 13 files changed, 45 insertions(+), 198 deletions(-)

diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
index 3ffbb8f..8bb9a66 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
@@ -110,7 +110,13 @@ public class CxfCustomizedExceptionTest extends CamelTestSupport {
                     .to(serviceURI);
                 // END SNIPPET: onException
                 // START SNIPPET: ThrowFault
-                from(routerEndpointURI).setFaultBody(constant(SOAP_FAULT));
+                from(routerEndpointURI).process(new Processor() {
+                    @Override
+                    public void process(Exchange exchange) throws Exception {
+                        exchange.getMessage().setFault(true);
+                        exchange.getMessage().setBody(SOAP_FAULT);
+                    }
+                });
                 // END SNIPPET: ThrowFault
             }
         };
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java
index 81a7099..b00300a 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringCustomizedExceptionTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.cxf;
 
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Text;
@@ -94,10 +96,14 @@ public class CxfSpringCustomizedExceptionTest extends CamelTestSupport  {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/CxfCustomizedExceptionContext.xml");
     }
     
-    public static class SOAPFaultFactory {
-        public SoapFault getSoapFault() {
-            return SOAP_FAULT;
+    public static class SOAPFaultProcessor implements Processor {
+
+        @Override
+        public void process(Exchange exchange) throws Exception {
+            exchange.getMessage().setFault(true);
+            exchange.getMessage().setBody(SOAP_FAULT);
         }
     }
 
+
 }
diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfCustomizedExceptionContext.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfCustomizedExceptionContext.xml
index 9397439..6886963 100644
--- a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfCustomizedExceptionContext.xml
+++ b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/CxfCustomizedExceptionContext.xml
@@ -25,21 +25,23 @@
     ">
     <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
-   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-       <endpoint id="to1" uri="cxf://http://localhost:${CXFTestSupport.port1}/CxfSpringCustomizedExceptionTest/router?serviceClass=org.apache.camel.component.cxf.HelloService"/>
-       <endpoint id="from1" uri="cxf://http://localhost:${CXFTestSupport.port1}/CxfSpringCustomizedExceptionTest/router?serviceClass=org.apache.camel.component.cxf.HelloService"/>
-    <route>
-      <from uri="direct:start" />
-      <to uri="ref:to1"/>
-    </route>
-    <route>
-      <from uri="ref:from1"/>
-      <setFaultBody>
-      	<method beanType="org.apache.camel.component.cxf.CxfSpringCustomizedExceptionTest$SOAPFaultFactory"/>
-      </setFaultBody>
-      <!-- Need to add output endpoint to get route loaded -->
-      <to uri="log:mylog"/>
-    </route>
-   </camelContext>
+    <bean id="myProcessor" class="org.apache.camel.component.cxf.CxfSpringCustomizedExceptionTest$SOAPFaultProcessor"/>
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <endpoint id="to1"
+                  uri="cxf://http://localhost:${CXFTestSupport.port1}/CxfSpringCustomizedExceptionTest/router?serviceClass=org.apache.camel.component.cxf.HelloService"/>
+        <endpoint id="from1"
+                  uri="cxf://http://localhost:${CXFTestSupport.port1}/CxfSpringCustomizedExceptionTest/router?serviceClass=org.apache.camel.component.cxf.HelloService"/>
+        <route>
+            <from uri="direct:start"/>
+            <to uri="ref:to1"/>
+        </route>
+        <route>
+            <from uri="ref:from1"/>
+            <process ref="myProcessor"/>
+            <!-- Need to add output endpoint to get route loaded -->
+            <to uri="log:mylog"/>
+        </route>
+    </camelContext>
 
 </beans>
\ No newline at end of file
diff --git a/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java b/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
index e712e2e..6510095 100644
--- a/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
+++ b/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
@@ -107,7 +107,6 @@ public class SplitterAndExceptionRouteTwistIssueTest extends CamelTestSupport {
                 );
 
                 from("direct:error")
-                    .handleFault()
                     .convertBodyTo(String.class, "UTF-8")
                     .process(new Processor() {
                         @Override
@@ -127,7 +126,6 @@ public class SplitterAndExceptionRouteTwistIssueTest extends CamelTestSupport {
 
 
                 from("direct:error2")
-                    .handleFault()
                     .convertBodyTo(String.class, "UTF-8")
                     .process(new Processor() {
                         @Override
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
index 1007150..47617c8 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
@@ -27,7 +27,7 @@ import org.junit.Test;
 import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
 
 /**
- * Unit test for request-reply with jms where processing the input could cause: OK, FAULT or Exception
+ * Unit test for request-reply with jms where processing the input could cause: OK or Exception
  */
 public class BruceHandlingBeanExceptionTest extends CamelTestSupport {
 
@@ -38,12 +38,6 @@ public class BruceHandlingBeanExceptionTest extends CamelTestSupport {
     }
 
     @Test
-    public void testSendFailure() throws Exception {
-        Object out = template.requestBody("activemq:queue:fault", "Hello World");
-        assertEquals("This is a fault message", out);
-    }
-
-    @Test
     public void testSendError() throws Exception {
         Object out = template.requestBody("activemq:queue:error", "Hello World");
         IllegalArgumentException e = assertIsInstanceOf(IllegalArgumentException.class, out);
@@ -65,8 +59,6 @@ public class BruceHandlingBeanExceptionTest extends CamelTestSupport {
             public void configure() throws Exception {
                 from("activemq:queue:ok").transform(constant("Bye World"));
 
-                from("activemq:queue:fault").setFaultBody(constant("This is a fault message"));
-
                 from("activemq:queue:error?transferException=true").bean(MyExceptionBean.class);
             }
         };
diff --git a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TransferExchangeOptionTest.java b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TransferExchangeOptionTest.java
index d0d864c..3ce215d 100644
--- a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TransferExchangeOptionTest.java
+++ b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2TransferExchangeOptionTest.java
@@ -66,19 +66,17 @@ public class Mina2TransferExchangeOptionTest extends BaseMina2Test {
         return exchange;
     }
 
-    private void assertExchange(Exchange exchange, boolean hasFault) {
-        if (!hasFault) {
+    private void assertExchange(Exchange exchange, boolean hasException) {
+        if (!hasException) {
             Message out = exchange.getOut();
             assertNotNull(out);
-            assertFalse(out.isFault());
             assertEquals("Goodbye!", out.getBody());
             assertEquals("cheddar", out.getHeader("cheese"));
         } else {
             Message fault = exchange.getOut();
             assertNotNull(fault);
-            assertTrue(fault.isFault());
             assertNotNull(fault.getBody());
-            assertTrue("Should get the InterrupteException exception", fault.getBody() instanceof InterruptedException);
+            assertTrue("Should get the InterruptedException exception", fault.getBody() instanceof InterruptedException);
             assertEquals("nihao", fault.getHeader("hello"));
         }
 
@@ -118,7 +116,6 @@ public class Mina2TransferExchangeOptionTest extends BaseMina2Test {
                         Boolean setException = (Boolean) e.getProperty("setException");
 
                         if (setException) {
-                            e.getOut().setFault(true);
                             e.getOut().setBody(new InterruptedException());
                             e.getOut().setHeader("hello", "nihao");
                         } else {
diff --git a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2VMTransferExchangeOptionTest.java b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2VMTransferExchangeOptionTest.java
index e249ac4..3ba21b0 100644
--- a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2VMTransferExchangeOptionTest.java
+++ b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2VMTransferExchangeOptionTest.java
@@ -61,19 +61,17 @@ public class Mina2VMTransferExchangeOptionTest extends BaseMina2Test {
         return exchange;
     }
 
-    private void assertExchange(Exchange exchange, boolean hasFault) {
-        if (!hasFault) {
+    private void assertExchange(Exchange exchange, boolean hasException) {
+        if (!hasException) {
             Message out = exchange.getOut();
             assertNotNull(out);
-            assertFalse(out.isFault());
             assertEquals("Goodbye!", out.getBody());
             assertEquals("cheddar", out.getHeader("cheese"));
         } else {
             Message fault = exchange.getOut();
             assertNotNull(fault);
-            assertTrue(fault.isFault());
             assertNotNull(fault.getBody());
-            assertTrue("Should get the InterrupteException exception", fault.getBody() instanceof InterruptedException);
+            assertTrue("Should get the InterruptedException exception", fault.getBody() instanceof InterruptedException);
             assertEquals("nihao", fault.getHeader("hello"));
         }
 
@@ -105,7 +103,6 @@ public class Mina2VMTransferExchangeOptionTest extends BaseMina2Test {
                         Boolean setException = (Boolean) e.getProperty("setException");
 
                         if (setException) {
-                            e.getOut().setFault(true);
                             e.getOut().setBody(new InterruptedException());
                             e.getOut().setHeader("hello", "nihao");
                         } else {
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java
index 3dd9556..2de14f7 100644
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java
+++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyTransferExchangeOptionTest.java
@@ -64,19 +64,17 @@ public class NettyTransferExchangeOptionTest extends BaseNettyTest {
         return exchange;
     }
 
-    private void assertExchange(Exchange exchange, boolean hasFault) {
-        if (!hasFault) {
+    private void assertExchange(Exchange exchange, boolean hasException) {
+        if (!hasException) {
             Message out = exchange.getOut();
             assertNotNull(out);
-            assertFalse(out.isFault());
             assertEquals("Goodbye!", out.getBody());
             assertEquals("cheddar", out.getHeader("cheese"));
         } else {
             Message fault = exchange.getOut();
             assertNotNull(fault);
-            assertTrue(fault.isFault());
             assertNotNull(fault.getBody());
-            assertTrue("Should get the InterrupteException exception", fault.getBody() instanceof InterruptedException);
+            assertTrue("Should get the InterruptedException exception", fault.getBody() instanceof InterruptedException);
             assertEquals("nihao", fault.getHeader("hello"));
         }
 
@@ -106,7 +104,6 @@ public class NettyTransferExchangeOptionTest extends BaseNettyTest {
                         Boolean setException = (Boolean) e.getProperty("setException");
 
                         if (setException) {
-                            e.getOut().setFault(true);
                             e.getOut().setBody(new InterruptedException());
                             e.getOut().setHeader("hello", "nihao");
                         } else {
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringSetFaultBodyTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringSetFaultBodyTest.java
deleted file mode 100644
index d5396a7..0000000
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringSetFaultBodyTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.processor;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.spring.SpringTestSupport;
-import org.junit.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class SpringSetFaultBodyTest extends SpringTestSupport {
-
-    @Override
-    protected AbstractXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/spring/processor/SpringSetFaultBodyTest.xml");
-    }
-
-    @Test
-    public void testSetFaultBody() throws Exception {
-        Exchange out = template.request("direct:start", new Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Hello World");
-            }
-        });
-
-        assertNotNull(out);
-        assertEquals("Bye World", out.getIn().getBody());
-        assertTrue("Should be a fault body", out.getIn().isFault());
-    }
-}
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringSetFaultBodyTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringSetFaultBodyTest.xml
deleted file mode 100644
index 97ff1da..0000000
--- a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringSetFaultBodyTest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-    <camelContext xmlns="http://camel.apache.org/schema/spring">
-
-        <route>
-            <from uri="direct:start"/>
-            <setFaultBody>
-                <constant>Bye World</constant>
-            </setFaultBody>
-        </route>
-
-    </camelContext>
-</beans>
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/SetFaultBodyDefinition.java b/core/camel-core/src/main/java/org/apache/camel/model/SetFaultBodyDefinition.java
deleted file mode 100644
index d5090a2..0000000
--- a/core/camel-core/src/main/java/org/apache/camel/model/SetFaultBodyDefinition.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.camel.Expression;
-import org.apache.camel.model.language.ExpressionDefinition;
-import org.apache.camel.spi.Metadata;
-
-/**
- *  Sets the contents of a fault message's body
- */
-@Metadata(label = "eip,transformation")
-@XmlRootElement(name = "setFaultBody")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class SetFaultBodyDefinition extends ExpressionNode {
-
-    public SetFaultBodyDefinition() {
-    }
-
-    public SetFaultBodyDefinition(Expression expression) {
-        super(expression);
-    }
-
-    @Override
-    public String toString() {
-        return "SetFaultBody[" + getExpression() + "]";
-    }
-
-    @Override
-    public String getShortName() {
-        return "setFaultBody";
-    }
-
-    @Override
-    public String getLabel() {
-        return "setFaultBody[" + getExpression() + "]";
-    }
-
-    /**
-     * Expression that returns the new fault body to use
-     */
-    @Override
-    public void setExpression(ExpressionDefinition expression) {
-        super.setExpression(expression);
-    }
-}
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index c84b4c3..8f4a253 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -77,7 +77,6 @@ import org.apache.camel.model.SamplingDefinition;
 import org.apache.camel.model.ScriptDefinition;
 import org.apache.camel.model.SetBodyDefinition;
 import org.apache.camel.model.SetExchangePatternDefinition;
-import org.apache.camel.model.SetFaultBodyDefinition;
 import org.apache.camel.model.SetHeaderDefinition;
 import org.apache.camel.model.SetPropertyDefinition;
 import org.apache.camel.model.SortDefinition;
diff --git a/docs/components/modules/ROOT/pages/language-component.adoc b/docs/components/modules/ROOT/pages/language-component.adoc
index 81161fa..dc3b08b 100644
--- a/docs/components/modules/ROOT/pages/language-component.adoc
+++ b/docs/components/modules/ROOT/pages/language-component.adoc
@@ -79,7 +79,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *binary* (producer) | Whether the script is binary content or text content. By default the script is read as text content (eg java.lang.String) | false | boolean
 | *cacheScript* (producer) | Whether to cache the compiled script and reuse Notice reusing the script can cause side effects from processing one Camel org.apache.camel.Exchange to the next org.apache.camel.Exchange. | false | boolean
-| *contentCache* (producer) | Sets whether to use resource content cache or not | false | boolean
+| *contentCache* (producer) | Sets whether to use resource content cache or not | true | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *script* (producer) | Sets the script to execute |  | String
 | *transform* (producer) | Whether or not the result of the script should be used as message body. This options is default true. | true | boolean


[camel] 08/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a1cce3314540307104b70011afd392805441afe7
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jul 21 13:02:57 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../component/openstack/cinder/VolumeProducerTest.java   | 16 ----------------
 .../component/openstack/keystone/DomainProducerTest.java |  7 -------
 .../component/openstack/keystone/GroupProducerTest.java  |  7 -------
 .../openstack/keystone/ProjectProducerTest.java          |  7 -------
 .../component/openstack/keystone/RegionProducerTest.java |  7 -------
 .../component/openstack/keystone/UserProducerTest.java   |  7 -------
 .../component/openstack/neutron/NetworkProducerTest.java |  7 -------
 .../component/openstack/neutron/PortProducerTest.java    |  7 -------
 .../component/openstack/neutron/RouterProducerTest.java  |  7 -------
 .../component/openstack/neutron/SubnetProducerTest.java  |  7 -------
 .../component/openstack/nova/FlavorProducerTest.java     |  3 ---
 .../component/openstack/nova/ServerProducerTest.java     |  7 -------
 .../component/openstack/swift/ContainerProducerTest.java | 13 -------------
 .../component/openstack/swift/ObjectProducerTest.java    | 14 --------------
 .../component/sjms/tx/TransactedQueueProducerTest.java   | 10 ++++++++--
 .../component/sjms/tx/TransactedTopicProducerTest.java   | 10 ++++++++--
 .../modules/ROOT/pages/activemq-component.adoc           |  9 +++------
 docs/components/modules/ROOT/pages/amqp-component.adoc   |  9 +++------
 docs/components/modules/ROOT/pages/jms-component.adoc    | 10 +++-------
 docs/components/modules/ROOT/pages/spring-boot.adoc      |  3 +--
 20 files changed, 26 insertions(+), 141 deletions(-)

diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java
index adff34a..69bfbb2 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/cinder/VolumeProducerTest.java
@@ -114,22 +114,6 @@ public class VolumeProducerTest extends CinderProducerTestSupport {
     }
 
     @Test
-    public void updateVolumeFailTest() throws Exception {
-        final String faultMessage = "fault";
-        when(volumeService.update(anyString(), anyString(), anyString())).thenReturn(ActionResponse.actionFailed(faultMessage, 401));
-
-        msg.setHeader(OpenstackConstants.OPERATION, OpenstackConstants.UPDATE);
-        final String id = "id";
-        msg.setHeader(OpenstackConstants.ID, id);
-        msg.setBody(createTestVolume());
-
-        producer.process(exchange);
-
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(faultMessage));
-    }
-
-    @Test
     public void getVolumeTest() throws Exception {
         when(endpoint.getOperation()).thenReturn(OpenstackConstants.GET);
         msg.setHeader(OpenstackConstants.ID, "anyID");
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java
index 2e3b871..fa02d1e 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/DomainProducerTest.java
@@ -152,13 +152,6 @@ public class DomainProducerTest extends KeystoneProducerTestSupport {
 
         verify(domainService).delete(domainIdCaptor.capture());
         assertEquals(networkID, domainIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(domainService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsDomain(Domain old, Domain newDomain) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java
index f8d4ca1..605c206 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/GroupProducerTest.java
@@ -153,13 +153,6 @@ public class GroupProducerTest extends KeystoneProducerTestSupport {
 
         verify(groupService).delete(groupIdCaptor.capture());
         assertEquals(networkID, groupIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(groupService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsGroup(Group old, Group newGroup) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java
index 00e40c1..e1be336 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/ProjectProducerTest.java
@@ -155,13 +155,6 @@ public class ProjectProducerTest extends KeystoneProducerTestSupport {
 
         verify(projectService).delete(projectIdCaptor.capture());
         assertEquals(networkID, projectIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(projectService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsProject(Project old, Project newProject) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java
index 3fc8fa0..9e8b10a 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/RegionProducerTest.java
@@ -149,13 +149,6 @@ public class RegionProducerTest extends KeystoneProducerTestSupport {
 
         verify(regionService).delete(regionIdCaptor.capture());
         assertEquals(networkID, regionIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(regionService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsRegion(Region old, Region newRegion) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java
index 1228f16..7d9722d 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/keystone/UserProducerTest.java
@@ -157,13 +157,6 @@ public class UserProducerTest extends KeystoneProducerTestSupport {
 
         verify(userService).delete(userIdCaptor.capture());
         assertEquals(networkID, userIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(userService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private void assertEqualsUser(User old, User newUser) {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java
index 32697b0..c7f15ed 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/NetworkProducerTest.java
@@ -133,13 +133,6 @@ public class NetworkProducerTest extends NeutronProducerTestSupport {
 
         verify(networkService).delete(networkIdCaptor.capture());
         assertEquals(networkID, networkIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(networkService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private Network createNetwork() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java
index 0fbe05d..8af3d62 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/PortProducerTest.java
@@ -154,13 +154,6 @@ public class PortProducerTest extends NeutronProducerTestSupport {
 
         verify(portService).delete(portIdCaptor.capture());
         assertEquals(portID, portIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(portService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private Port createPort() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java
index a950509..8b9aea8 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/RouterProducerTest.java
@@ -162,13 +162,6 @@ public class RouterProducerTest extends NeutronProducerTestSupport {
 
         verify(routerService).delete(routerIdCaptor.capture());
         assertEquals(routerID, routerIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(routerService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     @Test
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java
index eff4fb4..692fd78 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/neutron/SubnetProducerTest.java
@@ -132,13 +132,6 @@ public class SubnetProducerTest extends NeutronProducerTestSupport {
 
         verify(subnetService).delete(subnetIdCaptor.capture());
         assertEquals(subnetID, subnetIdCaptor.getValue());
-
-        //in case of failure
-        final String failureMessage = "fail";
-        when(subnetService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failureMessage, 404));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failureMessage));
     }
 
     private Subnet createSubnet() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java
index 0aa83f5..d4b7723 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/FlavorProducerTest.java
@@ -178,9 +178,6 @@ public class FlavorProducerTest extends NovaProducerTestSupport {
 
         verify(flavorService).delete(flavorIdCaptor.capture());
         assertEquals(id, flavorIdCaptor.getValue());
-
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failReason));
     }
 
     private Flavor createTestFlavor() {
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java
index 768b9e0..cde240d 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/nova/ServerProducerTest.java
@@ -121,13 +121,6 @@ public class ServerProducerTest extends NovaProducerTestSupport {
         assertEquals(id, idArgumentCaptor.getValue());
         assertTrue(actionArgumentCaptor.getValue() == Action.PAUSE);
         assertNull(msg.getBody());
-
-        //test fail
-        final String failReason = "fr";
-        when(serverService.action(anyString(), any())).thenReturn(ActionResponse.actionFailed(failReason, 401));
-        producer.process(exchange);
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failReason));
     }
 
     @Test
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java
index c9327e6..6478b04 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ContainerProducerTest.java
@@ -152,19 +152,6 @@ public class ContainerProducerTest extends SwiftProducerTestSupport {
     }
 
     @Test
-    public void deleteObjectFailTest() throws Exception {
-        final String failMessage = "fail";
-        when(containerService.delete(anyString())).thenReturn(ActionResponse.actionFailed(failMessage, 401));
-        msg.setHeader(OpenstackConstants.OPERATION, OpenstackConstants.DELETE);
-        msg.setHeader(SwiftConstants.CONTAINER_NAME, CONTAINER_NAME);
-
-        producer.process(exchange);
-
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failMessage));
-    }
-
-    @Test
     public void createUpdateMetadataTest() throws Exception {
         final Map<String, String> md = new HashMap<>();
         md.put("key", "val");
diff --git a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java
index 2add89d..312d22c 100644
--- a/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java
+++ b/components/camel-openstack/src/test/java/org/apache/camel/component/openstack/swift/ObjectProducerTest.java
@@ -147,20 +147,6 @@ public class ObjectProducerTest extends SwiftProducerTestSupport {
     }
 
     @Test
-    public void deleteObjectFailTest() throws Exception {
-        final String failMessage = "fail";
-        when(objectService.delete(anyString(), anyString())).thenReturn(ActionResponse.actionFailed(failMessage, 401));
-        msg.setHeader(OpenstackConstants.OPERATION, OpenstackConstants.DELETE);
-        msg.setHeader(SwiftConstants.CONTAINER_NAME, CONTAINER_NAME);
-        msg.setHeader(SwiftConstants.OBJECT_NAME, OBJECT_NAME);
-
-        producer.process(exchange);
-
-        assertTrue(msg.getExchange().isFailed());
-        assertTrue(msg.getExchange().getException().getMessage().contains(failMessage));
-    }
-
-    @Test
     public void updateMetadataTest() throws Exception {
         final Map<String, String> md = new HashMap<>();
         md.put("key", "val");
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java
index 0c8257f..a41f689 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedQueueProducerTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.RollbackExchangeException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.sjms.SjmsComponent;
@@ -47,7 +48,12 @@ public class TransactedQueueProducerTest extends CamelTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World 2");
 
-        template.sendBodyAndHeader("direct:start", "Hello World 1", "isfailed", true);
+        try {
+            template.sendBodyAndHeader("direct:start", "Hello World 1", "isfailed", true);
+            fail("Should fail");
+        } catch (Exception e) {
+            // expected
+        }
         template.sendBodyAndHeader("direct:start", "Hello World 2", "isfailed", false);
 
         mock.assertIsSatisfied();
@@ -88,7 +94,7 @@ public class TransactedQueueProducerTest extends CamelTestSupport {
                             public void process(Exchange exchange) throws Exception {
                                 if (exchange.getIn().getHeader("isfailed", Boolean.class)) {
                                     log.info("We failed. Should roll back.");
-                                    throw new IllegalArgumentException("Forced error");
+                                    throw new RollbackExchangeException(exchange);
                                 } else {
                                     log.info("We passed.  Should commit.");
                                 }
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java
index 540df18..2a9934e 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/TransactedTopicProducerTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.RollbackExchangeException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.sjms.SjmsComponent;
@@ -48,7 +49,12 @@ public class TransactedTopicProducerTest extends CamelTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World 2");
 
-        template.sendBodyAndHeader("direct:start", "Hello World 1", "isfailed", true);
+        try {
+            template.sendBodyAndHeader("direct:start", "Hello World 1", "isfailed", true);
+            fail("Should throw exception");
+        } catch (Exception e) {
+            // expected
+        }
         template.sendBodyAndHeader("direct:start", "Hello World 2", "isfailed", false);
 
         mock.assertIsSatisfied();
@@ -93,7 +99,7 @@ public class TransactedTopicProducerTest extends CamelTestSupport {
                             public void process(Exchange exchange) throws Exception {
                                 if (exchange.getIn().getHeader("isfailed", Boolean.class)) {
                                     log.info("We failed.  Should roll back.");
-                                    throw new IllegalArgumentException("Forced error");
+                                    throw new RollbackExchangeException(exchange);
                                 } else {
                                     log.info("We passed.  Should commit.");
                                 }
diff --git a/docs/components/modules/ROOT/pages/activemq-component.adoc b/docs/components/modules/ROOT/pages/activemq-component.adoc
index 4faf25f..13784cb 100644
--- a/docs/components/modules/ROOT/pages/activemq-component.adoc
+++ b/docs/components/modules/ROOT/pages/activemq-component.adoc
@@ -44,7 +44,7 @@ activemq:foo
 === Component options
 
 // component options: START
-The ActiveMQ component supports 86 options, which are listed below.
+The ActiveMQ component supports 85 options, which are listed below.
 
 
 
@@ -112,7 +112,6 @@ The ActiveMQ component supports 86 options, which are listed below.
 | *requestTimeoutChecker Interval* (advanced) | Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. | 1000 | long
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *jmsOperations* (advanced) | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs. |  | JmsOperations
 | *destinationResolver* (advanced) | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
 | *replyToType* (producer) | Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel will use temporary queues. However if replyTo has been configured, then Shared is used by default. This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation for more details, and especially the notes about the implications if running  [...]
@@ -163,7 +162,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (93 parameters):
+==== Query Parameters (92 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -249,7 +248,6 @@ with the following path and query parameters:
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *useMessageIDAsCorrelation ID* (advanced) | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | boolean
 | *waitForProvisionCorrelation ToBeUpdatedCounter* (advanced) | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | int
 | *waitForProvisionCorrelation ToBeUpdatedThreadSleeping Time* (advanced) | Interval in millis to sleep each time while waiting for provisional correlation id to be updated. | 100 | long
@@ -281,7 +279,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 87 options, which are listed below.
+The component supports 86 options, which are listed below.
 
 
 
@@ -367,7 +365,6 @@ The component supports 87 options, which are listed below.
 | *camel.component.activemq.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.activemq.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this opti [...]
 | *camel.component.activemq.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the p [...]
-| *camel.component.activemq.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Ca [...]
 | *camel.component.activemq.trust-all-packages* | Define if all packages are trusted or not | false | Boolean
 | *camel.component.activemq.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.activemq.use-pooled-connection* | Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the Spring JmsTemplate which will create a new connection, session, producer for each message then close them all down again. The default value is true. Note that this requires an extra dependency on commons-pool2. | false | Boolean
diff --git a/docs/components/modules/ROOT/pages/amqp-component.adoc b/docs/components/modules/ROOT/pages/amqp-component.adoc
index 5994810..23675ad 100644
--- a/docs/components/modules/ROOT/pages/amqp-component.adoc
+++ b/docs/components/modules/ROOT/pages/amqp-component.adoc
@@ -36,7 +36,7 @@ xref:../../../../camel-jms/src/main/docs/readme.adoc[JMS] component after the de
 
 
 // component options: START
-The AMQP component supports 81 options, which are listed below.
+The AMQP component supports 80 options, which are listed below.
 
 
 
@@ -99,7 +99,6 @@ The AMQP component supports 81 options, which are listed below.
 | *requestTimeoutChecker Interval* (advanced) | Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. | 1000 | long
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *jmsOperations* (advanced) | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs. |  | JmsOperations
 | *destinationResolver* (advanced) | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
 | *replyToType* (producer) | Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel will use temporary queues. However if replyTo has been configured, then Shared is used by default. This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation for more details, and especially the notes about the implications if running  [...]
@@ -153,7 +152,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (93 parameters):
+==== Query Parameters (92 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -239,7 +238,6 @@ with the following path and query parameters:
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *useMessageIDAsCorrelation ID* (advanced) | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | boolean
 | *waitForProvisionCorrelation ToBeUpdatedCounter* (advanced) | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | int
 | *waitForProvisionCorrelation ToBeUpdatedThreadSleeping Time* (advanced) | Interval in millis to sleep each time while waiting for provisional correlation id to be updated. | 100 | long
@@ -270,7 +268,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 82 options, which are listed below.
+The component supports 81 options, which are listed below.
 
 
 
@@ -354,7 +352,6 @@ The component supports 82 options, which are listed below.
 | *camel.component.amqp.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.amqp.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option t [...]
 | *camel.component.amqp.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the paylo [...]
-| *camel.component.amqp.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel  [...]
 | *camel.component.amqp.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.amqp.username* | Username to use with the ConnectionFactory. You can also configure username/password directly on the ConnectionFactory. |  | String
 | *camel.component.amqp.wait-for-provision-correlation-to-be-updated-counter* | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | Integer
diff --git a/docs/components/modules/ROOT/pages/jms-component.adoc b/docs/components/modules/ROOT/pages/jms-component.adoc
index aed022e..3e0b64f 100644
--- a/docs/components/modules/ROOT/pages/jms-component.adoc
+++ b/docs/components/modules/ROOT/pages/jms-component.adoc
@@ -192,7 +192,7 @@ about these properties by consulting the relevant Spring documentation.
 
 
 // component options: START
-The JMS component supports 81 options, which are listed below.
+The JMS component supports 80 options, which are listed below.
 
 
 
@@ -255,7 +255,6 @@ The JMS component supports 81 options, which are listed below.
 | *requestTimeoutChecker Interval* (advanced) | Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. | 1000 | long
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *jmsOperations* (advanced) | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs. |  | JmsOperations
 | *destinationResolver* (advanced) | A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to use your own resolver (for example, to lookup the real destination in a JNDI registry). |  | DestinationResolver
 | *replyToType* (producer) | Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel will use temporary queues. However if replyTo has been configured, then Shared is used by default. This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation for more details, and especially the notes about the implications if running  [...]
@@ -320,7 +319,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (93 parameters):
+==== Query Parameters (92 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -406,7 +405,6 @@ with the following path and query parameters:
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *transferException* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes preced [...]
 | *transferExchange* (advanced) | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloads is an E [...]
-| *transferFault* (advanced) | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel components  [...]
 | *useMessageIDAsCorrelation ID* (advanced) | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | boolean
 | *waitForProvisionCorrelation ToBeUpdatedCounter* (advanced) | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | int
 | *waitForProvisionCorrelation ToBeUpdatedThreadSleeping Time* (advanced) | Interval in millis to sleep each time while waiting for provisional correlation id to be updated. | 100 | long
@@ -437,7 +435,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 171 options, which are listed below.
+The component supports 169 options, which are listed below.
 
 
 
@@ -545,7 +543,6 @@ The component supports 171 options, which are listed below.
 | *camel.component.jms.configuration.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.jms.configuration.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled,  [...]
 | *camel.component.jms.configuration.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel kn [...]
-| *camel.component.jms.configuration.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on {@link org.apache.camel.Message#isFault()} will be send back in the response as a JMS header with the key {@link JmsConstants#JMS_TRANSFER_FAULT}. If the client is Camel, the returned fault flag will be set on the {@link org.apache.camel.Message#setFault(boolean)}. <p> You  [...]
 | *camel.component.jms.configuration.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.jms.configuration.username* | Username to use with the ConnectionFactory. You can also configure username/password directly on the ConnectionFactory. |  | String
 | *camel.component.jms.configuration.wait-for-provision-correlation-to-be-updated-counter* | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | Integer
@@ -610,7 +607,6 @@ The component supports 171 options, which are listed below.
 | *camel.component.jms.transaction-timeout* | The timeout value of the transaction (in seconds), if using transacted mode. | -1 | Integer
 | *camel.component.jms.transfer-exception* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option ta [...]
 | *camel.component.jms.transfer-exchange* | You can transfer the exchange over the wire instead of just the body and headers. The following fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. You must enable this option on both the producer and consumer side, so Camel knows the payloa [...]
-| *camel.component.jms.transfer-fault* | If enabled and you are using Request Reply messaging (InOut) and an Exchange failed with a SOAP fault (not exception) on the consumer side, then the fault flag on org.apache.camel.Message#isFault() will be send back in the response as a JMS header with the key JmsConstants#JMS_TRANSFER_FAULT. If the client is Camel, the returned fault flag will be set on the org.apache.camel.Message#setFault(boolean). You may want to enable this when using Camel c [...]
 | *camel.component.jms.use-message-i-d-as-correlation-i-d* | Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. | false | Boolean
 | *camel.component.jms.username* | Username to use with the ConnectionFactory. You can also configure username/password directly on the ConnectionFactory. |  | String
 | *camel.component.jms.wait-for-provision-correlation-to-be-updated-counter* | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. | 50 | Integer
diff --git a/docs/components/modules/ROOT/pages/spring-boot.adoc b/docs/components/modules/ROOT/pages/spring-boot.adoc
index 230b5c2..c81424e 100644
--- a/docs/components/modules/ROOT/pages/spring-boot.adoc
+++ b/docs/components/modules/ROOT/pages/spring-boot.adoc
@@ -89,7 +89,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 125 options, which are listed below.
+The component supports 124 options, which are listed below.
 
 
 
@@ -151,7 +151,6 @@ The component supports 125 options, which are listed below.
 | *camel.springboot.duration-max-seconds* | To specify for how long time in seconds to keep running the JVM before automatic terminating the JVM. You can use this to run Spring Boot for a short while. | 0 | Integer
 | *camel.springboot.endpoint-runtime-statistics-enabled* | Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints). The default value is false. | false | Boolean
 | *camel.springboot.file-configurations* | Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You must use either file: or classpath: as prefix to load from file system or classpath. Then you can specify a pattern to load from sub directories and a name pattern such as file:/var/ [...]
-| *camel.springboot.handle-fault* | Sets whether fault handling is enabled or not. Default is false. | false | Boolean
 | *camel.springboot.include-non-singletons* | Whether to include non-singleton beans (prototypes) when scanning for RouteBuilder instances. By default only singleton beans is included in the context scan. | false | Boolean
 | *camel.springboot.java-routes-exclude-pattern* | Used for exclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to exclude all classes starting with Bar use: &#42;&#42;/Bar&#42; To exclude all routes form a specific package use: com/mycompany/bar/&#42; To exclude all routes [...]
 | *camel.springboot.java-routes-include-pattern* | Used for inclusive filtering component scanning of RouteBuilder classes with @Component annotation. The exclusive filtering takes precedence over inclusive filtering. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma. For example to include all classes starting with Foo use: &#42;&#42;/Foo* To include all routes form a specific package use: com/mycompany/foo/&#42; To include all routes for [...]


[camel] 01/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2a5a161d22de831379bcbf0c2217e4f2754aeb57
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jul 19 09:52:27 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../spring/processor/SpringFaultRouteTest.java     | 31 --------
 .../processor/SpringHandleFaultPerRouteTest.java   | 29 -------
 .../apache/camel/spring/processor/faultRoute.xml   | 37 ---------
 .../camel/spring/processor/handlefaultperroute.xml | 46 -----------
 .../src/main/java/org/apache/camel/Exchange.java   |  2 -
 .../src/main/java/org/apache/camel/Message.java    |  2 +
 .../org/apache/camel/RuntimeConfiguration.java     | 14 ----
 .../camel/impl/engine/AbstractCamelContext.java    | 25 ------
 .../camel/impl/engine/DefaultRouteContext.java     | 13 ----
 .../apache/camel/processor/FinallyProcessor.java   | 26 +------
 .../camel/processor/OnCompletionProcessor.java     | 12 ---
 .../camel/processor/interceptor/HandleFault.java   | 59 --------------
 .../core/xml/AbstractCamelContextFactoryBean.java  | 11 ---
 .../apache/camel/model/ProcessorDefinition.java    | 12 ---
 .../org/apache/camel/model/RouteDefinition.java    | 36 ---------
 .../org/apache/camel/reifier/ProcessorReifier.java | 11 +--
 .../org/apache/camel/reifier/RouteReifier.java     | 16 ----
 .../apache/camel/reifier/SetFaultBodyReifier.java  |  1 +
 .../camel/builder/FluentProducerTemplateTest.java  |  6 --
 .../org/apache/camel/impl/DefaultExchangeTest.java | 18 -----
 .../camel/impl/DefaultProducerTemplateTest.java    |  8 --
 .../apache/camel/issues/OnCompletionIssueTest.java |  6 +-
 .../processor/ExceptionHandlerStreamCacheTest.java | 20 +----
 .../FailOverLoadBalancerSetFaultTest.java          |  2 -
 .../FaultRetryRouteNewConfigurationTest.java       | 43 ----------
 .../camel/processor/FaultRetryRouteTest.java       | 83 --------------------
 .../org/apache/camel/processor/FaultRouteTest.java | 91 ----------------------
 .../camel/processor/HandleFaultPerRouteTest.java   | 88 ---------------------
 .../org/apache/camel/processor/PipelineTest.java   | 17 ----
 .../camel/processor/TrySetFaultFinallyTest.java    | 54 -------------
 .../apache/camel/processor/TrySetFaultTest.java    | 70 -----------------
 .../async/AsyncEndpointWithHandleFaultTest.java    | 82 -------------------
 .../camel/processor/enricher/FailureProcessor.java |  1 +
 .../intercept/InterceptSendToFaultTest.java        | 47 -----------
 .../camel/main/DefaultConfigurationConfigurer.java |  6 --
 .../org/apache/camel/support/DefaultExchange.java  |  2 -
 .../camel/support/DefaultExchangeHolder.java       | 14 ----
 .../org/apache/camel/support/MessageSupport.java   |  1 -
 38 files changed, 11 insertions(+), 1031 deletions(-)

diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java
deleted file mode 100644
index 8151914..0000000
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFaultRouteTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.processor;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.processor.FaultRouteTest;
-
-import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
-
-/**
- * The spring context test for the FaultRoute
- */
-public class SpringFaultRouteTest extends FaultRouteTest {
-    protected CamelContext createCamelContext() throws Exception {
-        return createSpringCamelContext(this, "org/apache/camel/spring/processor/faultRoute.xml");
-    }
-}
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringHandleFaultPerRouteTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringHandleFaultPerRouteTest.java
deleted file mode 100644
index 7b417ac..0000000
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringHandleFaultPerRouteTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.processor;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.processor.HandleFaultPerRouteTest;
-
-import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
-
-public class SpringHandleFaultPerRouteTest extends HandleFaultPerRouteTest {
-
-    protected CamelContext createCamelContext() throws Exception {
-        return createSpringCamelContext(this, "org/apache/camel/spring/processor/handlefaultperroute.xml");
-    }
-}
\ No newline at end of file
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml
deleted file mode 100644
index afe9d1d..0000000
--- a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/faultRoute.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-    <!-- START SNIPPET: example -->
-    <camelContext handleFault="true" xmlns="http://camel.apache.org/schema/spring">
-        <route>
-            <from uri="direct:start"/>
-            <to uri="mock:a"/>
-            <to uri="mock:b"/>
-        </route>
-    </camelContext>
-    <!-- END SNIPPET: example -->
-
-</beans>
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/handlefaultperroute.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/handlefaultperroute.xml
deleted file mode 100644
index 503f075..0000000
--- a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/handlefaultperroute.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-    <camelContext handleFault="true" xmlns="http://camel.apache.org/schema/spring">
-
-        <route handleFault="true">
-            <from uri="direct:a"/>
-            <to uri="mock:a"/>
-        </route>
-
-        <route handleFault="false">
-            <from uri="direct:b"/>
-            <to uri="mock:b"/>
-        </route>
-
-        <route>
-            <from uri="direct:c"/>
-            <to uri="mock:c"/>
-        </route>
-
-    </camelContext>
-
-</beans>
diff --git a/core/camel-api/src/main/java/org/apache/camel/Exchange.java b/core/camel-api/src/main/java/org/apache/camel/Exchange.java
index a61748d..35b5551 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Exchange.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Exchange.java
@@ -488,8 +488,6 @@ public interface Exchange {
      *
      * @return true if this exchange failed due to either an exception or fault
      * @see Exchange#getException()
-     * @see Message#setFault(boolean)
-     * @see Message#isFault()
      */
     boolean isFailed();
 
diff --git a/core/camel-api/src/main/java/org/apache/camel/Message.java b/core/camel-api/src/main/java/org/apache/camel/Message.java
index e3022c0a..078ec1d 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Message.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Message.java
@@ -58,6 +58,7 @@ public interface Message {
      *
      * @return <tt>true</tt> if this is a fault message, <tt>false</tt> for regular messages.
      */
+    @Deprecated
     boolean isFault();
 
     /**
@@ -65,6 +66,7 @@ public interface Message {
      *
      * @param fault the fault flag
      */
+    @Deprecated
     void setFault(boolean fault);
 
     /**
diff --git a/core/camel-api/src/main/java/org/apache/camel/RuntimeConfiguration.java b/core/camel-api/src/main/java/org/apache/camel/RuntimeConfiguration.java
index 413a733..2078dc5 100644
--- a/core/camel-api/src/main/java/org/apache/camel/RuntimeConfiguration.java
+++ b/core/camel-api/src/main/java/org/apache/camel/RuntimeConfiguration.java
@@ -107,20 +107,6 @@ public interface RuntimeConfiguration {
     Boolean isLogExhaustedMessageBody();
 
     /**
-     * Sets whether fault handling is enabled or not (default is disabled).
-     *
-     * @param handleFault whether to enable fault handling.
-     */
-    void setHandleFault(Boolean handleFault);
-
-    /**
-     * Returns whether fault handling enabled
-     *
-     * @return <tt>true</tt> if fault handling is enabled
-     */
-    Boolean isHandleFault();
-
-    /**
      * Sets a delay value in millis that a message is delayed at every step it takes in the route path,
      * slowing the process down to better observe what is occurring
      * <p/>
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 89f3e6a..11cdfdd 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -78,7 +78,6 @@ import org.apache.camel.TypeConverter;
 import org.apache.camel.VetoCamelContextStartException;
 import org.apache.camel.impl.transformer.TransformerKey;
 import org.apache.camel.impl.validator.ValidatorKey;
-import org.apache.camel.processor.interceptor.HandleFault;
 import org.apache.camel.spi.AnnotationBasedProcessorFactory;
 import org.apache.camel.spi.AsyncProcessorAwaitManager;
 import org.apache.camel.spi.BeanProcessorFactory;
@@ -198,7 +197,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
     private Boolean logMask = Boolean.FALSE;
     private Boolean logExhaustedMessageBody = Boolean.FALSE;
     private Boolean streamCache = Boolean.FALSE;
-    private Boolean handleFault = Boolean.FALSE;
     private Boolean disableJMX = Boolean.FALSE;
     private Boolean loadTypeConverters = Boolean.TRUE;
     private Boolean typeConverterStatisticsEnabled = Boolean.FALSE;
@@ -1886,13 +1884,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
 
     public void addInterceptStrategy(InterceptStrategy interceptStrategy) {
         getInterceptStrategies().add(interceptStrategy);
-
-        // for backwards compatible or if user add them here instead of the
-        // setXXX methods
-
-        if (interceptStrategy instanceof HandleFault) {
-            setHandleFault(true);
-        }
     }
 
     public List<RoutePolicyFactory> getRoutePolicyFactories() {
@@ -1963,14 +1954,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
         this.logExhaustedMessageBody = logExhaustedMessageBody;
     }
 
-    public Boolean isHandleFault() {
-        return handleFault;
-    }
-
-    public void setHandleFault(Boolean handleFault) {
-        this.handleFault = handleFault;
-    }
-
     public Long getDelayer() {
         return delay;
     }
@@ -2446,14 +2429,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
             log.info("MDC logging is enabled on CamelContext: {}", getName());
         }
 
-        if (isHandleFault()) {
-            // only add a new handle fault if not already configured
-            if (HandleFault.getHandleFault(this) == null) {
-                log.info("HandleFault is enabled on CamelContext: {}", getName());
-                addInterceptStrategy(new HandleFault());
-            }
-        }
-
         if (getDelayer() != null && getDelayer() > 0) {
             log.info("Delayer is enabled with: {} ms. on CamelContext: {}", getDelayer(), getName());
         }
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java
index ebbc5a4..b055e28 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java
@@ -335,19 +335,6 @@ public class DefaultRouteContext implements RouteContext {
         }
     }
 
-    public void setHandleFault(Boolean handleFault) {
-        this.handleFault = handleFault;
-    }
-
-    public Boolean isHandleFault() {
-        if (handleFault != null) {
-            return handleFault;
-        } else {
-            // fallback to the option from camel context
-            return getCamelContext().isHandleFault();
-        }
-    }
-
     public void setDelayer(Long delay) {
         this.delay = delay;
     }
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/FinallyProcessor.java b/core/camel-base/src/main/java/org/apache/camel/processor/FinallyProcessor.java
index 411f967..be7be43 100644
--- a/core/camel-base/src/main/java/org/apache/camel/processor/FinallyProcessor.java
+++ b/core/camel-base/src/main/java/org/apache/camel/processor/FinallyProcessor.java
@@ -37,17 +37,7 @@ public class FinallyProcessor extends DelegateAsyncProcessor implements Traceabl
 
     @Override
     public boolean process(final Exchange exchange, final AsyncCallback callback) {
-        // clear exception and fault so finally block can be executed
-        final boolean fault;
-        if (exchange.hasOut()) {
-            fault = exchange.getOut().isFault();
-            exchange.getOut().setFault(false);
-        } else {
-            fault = exchange.getIn().isFault();
-            exchange.getIn().setFault(false);
-        }
-
-        final Exception exception = exchange.getException();
+        Exception exception = exchange.getException();
         exchange.setException(null);
         // but store the caught exception as a property
         if (exception != null) {
@@ -60,7 +50,7 @@ public class FinallyProcessor extends DelegateAsyncProcessor implements Traceabl
         }
 
         // continue processing
-        return processor.process(exchange, new FinallyAsyncCallback(exchange, callback, exception, fault));
+        return processor.process(exchange, new FinallyAsyncCallback(exchange, callback, exception));
     }
 
     @Override
@@ -85,13 +75,11 @@ public class FinallyProcessor extends DelegateAsyncProcessor implements Traceabl
         private final Exchange exchange;
         private final AsyncCallback callback;
         private final Exception exception;
-        private final boolean fault;
 
-        FinallyAsyncCallback(Exchange exchange, AsyncCallback callback, Exception exception, boolean fault) {
+        FinallyAsyncCallback(Exchange exchange, AsyncCallback callback, Exception exception) {
             this.exchange = exchange;
             this.callback = callback;
             this.exception = exception;
-            this.fault = fault;
         }
 
         @Override
@@ -104,14 +92,6 @@ public class FinallyProcessor extends DelegateAsyncProcessor implements Traceabl
                     exchange.setException(exception);
                     exchange.setProperty(Exchange.EXCEPTION_CAUGHT, exception);
                 }
-                // set fault flag back
-                if (fault) {
-                    if (exchange.hasOut()) {
-                        exchange.getOut().setFault(true);
-                    } else {
-                        exchange.getIn().setFault(true);
-                    }
-                }
 
                 if (!doneSync) {
                     // signal callback to continue routing async
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java b/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
index d4ea972..09e7e81 100644
--- a/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
+++ b/core/camel-base/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
@@ -261,12 +261,6 @@ public class OnCompletionProcessor extends AsyncProcessorSupport implements Trac
             // must remove exception otherwise onFailure routing will fail as well
             // the caused exception is stored as a property (Exchange.EXCEPTION_CAUGHT) on the exchange
             copy.setException(null);
-            // must clear fault otherwise onFailure routing will fail as well
-            if (copy.hasOut()) {
-                copy.getOut().setFault(false);
-            } else {
-                copy.getIn().setFault(false);
-            }
 
             if (executorService != null) {
                 executorService.submit(new Callable<Exchange>() {
@@ -284,12 +278,6 @@ public class OnCompletionProcessor extends AsyncProcessorSupport implements Trac
                 doProcess(processor, copy);
                 // restore exception after processing
                 copy.setException(original);
-                // restore fault after processing
-                if (copy.hasOut()) {
-                    copy.getOut().setFault(originalFault);
-                } else {
-                    copy.getIn().setFault(originalFault);
-                }
             }
         }
 
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/interceptor/HandleFault.java b/core/camel-base/src/main/java/org/apache/camel/processor/interceptor/HandleFault.java
deleted file mode 100644
index 5f3d3a6..0000000
--- a/core/camel-base/src/main/java/org/apache/camel/processor/interceptor/HandleFault.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor.interceptor;
-
-import java.util.List;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.NamedNode;
-import org.apache.camel.Processor;
-import org.apache.camel.spi.InterceptStrategy;
-
-/**
- * {@link org.apache.camel.spi.InterceptStrategy} implementation to handle faults as exceptions on a RouteContext
- */
-public final class HandleFault implements InterceptStrategy {
-
-    public Processor wrapProcessorInInterceptors(CamelContext context,
-                                                 NamedNode definition, Processor target, Processor nextTarget) throws Exception {
-
-        return new HandleFaultInterceptor(target);
-    }
-
-    /**
-     * A helper method to return the HandleFault instance
-     * for a given {@link org.apache.camel.CamelContext} if one is enabled
-     *
-     * @param context the camel context the handlefault intercept strategy is connected to
-     * @return the stream cache or null if none can be found
-     */
-    public static HandleFault getHandleFault(CamelContext context) {
-        List<InterceptStrategy> list = context.adapt(ExtendedCamelContext.class).getInterceptStrategies();
-        for (InterceptStrategy interceptStrategy : list) {
-            if (interceptStrategy instanceof HandleFault) {
-                return (HandleFault)interceptStrategy;
-            }
-        }
-        return null;
-    }
-
-    @Override
-    public String toString() {
-        return "HandleFault";
-    }
-}
\ No newline at end of file
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 8f7c223..86bdcfe 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -77,7 +77,6 @@ import org.apache.camel.model.rest.RestDefinition;
 import org.apache.camel.model.transformer.TransformersDefinition;
 import org.apache.camel.model.validator.ValidatorsDefinition;
 import org.apache.camel.processor.interceptor.BacklogTracer;
-import org.apache.camel.processor.interceptor.HandleFault;
 import org.apache.camel.runtimecatalog.JSonSchemaResolver;
 import org.apache.camel.runtimecatalog.RuntimeCamelCatalog;
 import org.apache.camel.spi.AsyncProcessorAwaitManager;
@@ -200,11 +199,6 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
             LOG.info("Using custom BacklogTracer: {}", backlogTracer);
             getContext().addService(backlogTracer);
         }
-        HandleFault handleFault = getBeanForType(HandleFault.class);
-        if (handleFault != null) {
-            LOG.info("Using custom HandleFault: {}", handleFault);
-            getContext().adapt(ExtendedCamelContext.class).addInterceptStrategy(handleFault);
-        }
         InflightRepository inflightRepository = getBeanForType(InflightRepository.class);
         if (inflightRepository != null) {
             LOG.info("Using custom InflightRepository: {}", inflightRepository);
@@ -751,8 +745,6 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
 
     public abstract String getDelayer();
 
-    public abstract String getHandleFault();
-
     public abstract String getAutoStartup();
 
     public abstract String getUseMDCLogging();
@@ -847,9 +839,6 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
         if (getDelayer() != null) {
             context.setDelayer(CamelContextHelper.parseLong(context, getDelayer()));
         }
-        if (getHandleFault() != null) {
-            context.setHandleFault(CamelContextHelper.parseBoolean(context, getHandleFault()));
-        }
         if (getErrorHandlerRef() != null) {
             context.adapt(ExtendedCamelContext.class).setErrorHandlerFactory(new ErrorHandlerBuilderRef(getErrorHandlerRef()));
         }
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
index 741a015..52d8ccc 100644
--- a/core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
+++ b/core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
@@ -2526,18 +2526,6 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
     }
 
     /**
-     * Adds a processor which sets the body on the FAULT message
-     *
-     * @param expression   the expression used to set the body
-     * @return the builder
-     */
-    public Type setFaultBody(Expression expression) {
-        SetFaultBodyDefinition answer = new SetFaultBodyDefinition(expression);
-        addOutput(answer);
-        return asType();
-    }
-
-    /**
      * Adds a processor which sets the header on the IN message
      *
      * @param name  the header name
diff --git a/core/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java b/core/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
index 8b2d1a4..9c4927d 100644
--- a/core/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
+++ b/core/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
@@ -59,7 +59,6 @@ public class RouteDefinition extends ProcessorDefinition<RouteDefinition> implem
     private String trace;
     private String messageHistory;
     private String logMask;
-    private String handleFault;
     private String delayer;
     private String autoStartup;
     private Integer startupOrder;
@@ -344,26 +343,6 @@ public class RouteDefinition extends ProcessorDefinition<RouteDefinition> implem
     }
 
     /**
-     * Disable handle fault for this route.
-     *
-     * @return the builder
-     */
-    public RouteDefinition noHandleFault() {
-        setHandleFault("false");
-        return this;
-    }
-
-    /**
-     * Enable handle fault for this route.
-     *
-     * @return the builder
-     */
-    public RouteDefinition handleFault() {
-        setHandleFault("true");
-        return this;
-    }
-
-    /**
      * Disable delayer for this route.
      *
      * @return the builder
@@ -776,21 +755,6 @@ public class RouteDefinition extends ProcessorDefinition<RouteDefinition> implem
     }
 
     /**
-     * Whether handle fault is enabled on this route.
-     */
-    public String getHandleFault() {
-        return handleFault;
-    }
-
-    /**
-     * Whether handle fault is enabled on this route.
-     */
-    @XmlAttribute
-    public void setHandleFault(String handleFault) {
-        this.handleFault = handleFault;
-    }
-
-    /**
      * Whether to slow down processing messages by a given delay in msec.
      */
     public String getDelayer() {
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index 1ecb803..c8685ec 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -102,7 +102,6 @@ import org.apache.camel.model.language.ExpressionDefinition;
 import org.apache.camel.processor.InterceptEndpointProcessor;
 import org.apache.camel.processor.Pipeline;
 import org.apache.camel.processor.channel.DefaultChannel;
-import org.apache.camel.processor.interceptor.HandleFault;
 import org.apache.camel.reifier.errorhandler.ErrorHandlerReifier;
 import org.apache.camel.spi.IdAware;
 import org.apache.camel.spi.InterceptStrategy;
@@ -418,15 +417,7 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> {
      * @param strategies    list of strategies to add.
      */
     protected void addInterceptStrategies(RouteContext routeContext, List<InterceptStrategy> interceptors, List<InterceptStrategy> strategies) {
-        for (InterceptStrategy strategy : strategies) {
-            if (!routeContext.isHandleFault() && strategy instanceof HandleFault) {
-                // handle fault is disabled so we should not add it
-                continue;
-            }
-
-            // add strategy
-            interceptors.add(strategy);
-        }
+        interceptors.addAll(strategies);
     }
 
     /**
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/RouteReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/RouteReifier.java
index 1675c38..ec490e3 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/RouteReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/RouteReifier.java
@@ -40,7 +40,6 @@ import org.apache.camel.model.PropertyDefinition;
 import org.apache.camel.model.RouteDefinition;
 import org.apache.camel.model.RoutesDefinition;
 import org.apache.camel.processor.ContractAdvice;
-import org.apache.camel.processor.interceptor.HandleFault;
 import org.apache.camel.reifier.rest.RestBindingReifier;
 import org.apache.camel.spi.Contract;
 import org.apache.camel.spi.LifecycleStrategy;
@@ -245,21 +244,6 @@ public class RouteReifier extends ProcessorReifier<RouteDefinition> {
             }
         }
 
-        // configure handle fault
-        if (definition.getHandleFault() != null) {
-            Boolean isHandleFault = CamelContextHelper.parseBoolean(camelContext, definition.getHandleFault());
-            if (isHandleFault != null) {
-                routeContext.setHandleFault(isHandleFault);
-                if (isHandleFault) {
-                    log.debug("HandleFault is enabled on route: {}", definition.getId());
-                    // only add a new handle fault if not already a global configured on camel context
-                    if (HandleFault.getHandleFault(camelContext) == null) {
-                        definition.addInterceptStrategy(new HandleFault());
-                    }
-                }
-            }
-        }
-
         // configure delayer
         if (definition.getDelayer() != null) {
             Long delayer = CamelContextHelper.parseLong(camelContext, definition.getDelayer());
diff --git a/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java b/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java
index a8cd337..c948c7e 100644
--- a/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java
+++ b/core/camel-core/src/main/java/org/apache/camel/reifier/SetFaultBodyReifier.java
@@ -22,6 +22,7 @@ import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.model.SetFaultBodyDefinition;
 import org.apache.camel.spi.RouteContext;
 
+@Deprecated
 public class SetFaultBodyReifier extends ExpressionReifier<SetFaultBodyDefinition> {
 
     SetFaultBodyReifier(ProcessorDefinition<?> definition) {
diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
index 5a7beb9..2cb75ad 100644
--- a/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/builder/FluentProducerTemplateTest.java
@@ -436,12 +436,6 @@ public class FluentProducerTemplateTest extends ContextTestSupport {
                 from("direct:out")
                     .process(exchange -> exchange.getOut().setBody("Bye Bye World"))
                     .to("mock:result");
-                from("direct:fault")
-                    .process(exchange -> {
-                        exchange.getOut().setFault(true);
-                        exchange.getOut().setBody("Faulty World");
-                    })
-                    .to("mock:result");
 
                 from("direct:exception")
                     .process(exchange -> {
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultExchangeTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultExchangeTest.java
index fea396a..c8026d9 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultExchangeTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultExchangeTest.java
@@ -247,24 +247,6 @@ public class DefaultExchangeTest extends ExchangeTestSupport {
                      sourceIn.getClass(), destIn.getClass());
     }
 
-    @Test
-    public void testFaultSafeCopy() {
-        testFaultCopy();
-    }
-
-    private void testFaultCopy() {
-        DefaultExchange sourceExchange = new DefaultExchange(context);
-        MyMessage source = new MyMessage(context);
-        source.setFault(true);
-        sourceExchange.setIn(source);
-        sourceExchange.setOut(source);
-        Exchange destExchange = sourceExchange.copy();
-        assertEquals("Fault property was not copied to IN message",
-                sourceExchange.getIn().isFault(), destExchange.getIn().isFault());
-        assertEquals("Fault property was not copied to OUT message",
-                sourceExchange.getOut().isFault(), destExchange.getOut().isFault());
-    }
-
     public static class MyMessage extends DefaultMessage {
         public MyMessage(CamelContext camelContext) {
             super(camelContext);
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
index 8b75050..6050156 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
@@ -274,14 +274,6 @@ public class DefaultProducerTemplateTest extends ContextTestSupport {
                     }
                 }).to("mock:result");
 
-                from("direct:fault").process(new Processor() {
-                    @Override
-                    public void process(Exchange exchange) throws Exception {
-                        exchange.getOut().setFault(true);
-                        exchange.getOut().setBody("Faulty World");
-                    }
-                }).to("mock:result");
-
                 from("direct:exception").process(new Processor() {
                     @Override
                     public void process(Exchange exchange) throws Exception {
diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/OnCompletionIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/OnCompletionIssueTest.java
index 36419d6..ec4facf 100644
--- a/core/camel-core/src/test/java/org/apache/camel/issues/OnCompletionIssueTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/issues/OnCompletionIssueTest.java
@@ -34,11 +34,10 @@ public class OnCompletionIssueTest extends ContextTestSupport {
         complete.expectedBodiesReceivedInAnyOrder("finish", "stop", "ile", "markRollback");
 
         MockEndpoint failed = getMockEndpoint("mock:failed");
-        failed.expectedBodiesReceivedInAnyOrder("faulted", "npe", "rollback");
+        failed.expectedBodiesReceivedInAnyOrder("npe", "rollback");
 
         template.sendBody("direct:input", "finish");
         template.sendBody("direct:input", "stop");
-        template.sendBody("direct:input", "fault");
         template.sendBody("direct:input", "ile");
         template.sendBody("direct:input", "markRollback");
 
@@ -80,9 +79,6 @@ public class OnCompletionIssueTest extends ContextTestSupport {
                         .when(simple("${body} == 'stop'"))
                             .log("stopping")
                             .stop()
-                        .when(simple("${body} == 'fault'"))
-                            .log("faulting")
-                            .setFaultBody(constant("faulted"))
                         .when(simple("${body} == 'ile'"))
                             .log("excepting")
                             .throwException(new IllegalArgumentException("Exception requested"))
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ExceptionHandlerStreamCacheTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ExceptionHandlerStreamCacheTest.java
index 1ec397e..8d28b04 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ExceptionHandlerStreamCacheTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ExceptionHandlerStreamCacheTest.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package org.apache.camel.processor;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -41,11 +42,6 @@ public class ExceptionHandlerStreamCacheTest extends ContextTestSupport {
     private MockEndpoint exceptionEndpoint;
 
     @Test
-    public void testSendFault() throws Exception {
-        doTestInputStreamPayload("fault");
-    }
-
-    @Test
     public void testSendError() throws Exception {
         doTestInputStreamPayload("error");
     }
@@ -64,11 +60,6 @@ public class ExceptionHandlerStreamCacheTest extends ContextTestSupport {
     }
 
     @Test
-    public void testSendFaultXml() throws Exception {
-        doTestXmlPayload("<fault/>");
-    }
-
-    @Test
     public void testSendErrorXml() throws Exception {
         doTestXmlPayload("<error/>");
     }
@@ -99,8 +90,7 @@ public class ExceptionHandlerStreamCacheTest extends ContextTestSupport {
 
         return new RouteBuilder() {
             public void configure() {
-                // enable support for handling faults and stream caching
-                context.setHandleFault(true);
+                // enable support for stream caching
                 context.setStreamCaching(true);
 
                 onException(Exception.class).handled(true).to("mock:exception");
@@ -109,12 +99,6 @@ public class ExceptionHandlerStreamCacheTest extends ContextTestSupport {
                     public void process(Exchange exchange) throws Exception {
                         String message = exchange.getIn().getBody(String.class);
 
-                        if (message.contains("fault")) {
-                            exchange.getOut().copyFrom(exchange.getIn());
-                            exchange.getOut().setBody(new ByteArrayInputStream(message.getBytes()));
-                            exchange.getOut().setFault(true);
-                        }
-
                         if (message.contains("error")) {
                             throw new RuntimeException(message);
                         }
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/FailOverLoadBalancerSetFaultTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/FailOverLoadBalancerSetFaultTest.java
index 82241bf..621d2fd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/FailOverLoadBalancerSetFaultTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/FailOverLoadBalancerSetFaultTest.java
@@ -56,8 +56,6 @@ public class FailOverLoadBalancerSetFaultTest extends ContextTestSupport {
                             public void process(Exchange exchange) throws Exception {
                                 // mutate the message
                                 exchange.getOut().setBody("Hi Camel");
-                                // and then set fault directly on OUT for example as camel-cxf would do
-                                exchange.getOut().setFault(true);
                                 exchange.setException(new IOException("Forced exception for test"));
                             }
                         });
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteNewConfigurationTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteNewConfigurationTest.java
deleted file mode 100644
index 3faddd9..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteNewConfigurationTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.LoggingLevel;
-import org.apache.camel.builder.RouteBuilder;
-
-public class FaultRetryRouteNewConfigurationTest extends FaultRetryRouteTest {
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() {
-                getContext().setHandleFault(true);
-
-                errorHandler(
-                    deadLetterChannel("mock:error")
-                        .maximumRedeliveries(4)
-                        .loggingLevel(LoggingLevel.DEBUG));
-
-                from("direct:start")
-                    .to("mock:a")
-                    .process(successOnRetryProcessor)
-                    .to("mock:b");
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java
deleted file mode 100644
index f99c8d6..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/FaultRetryRouteTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-import org.apache.camel.CamelException;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.LoggingLevel;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.processor.interceptor.HandleFault;
-import org.junit.Before;
-import org.junit.Test;
-
-public class FaultRetryRouteTest extends ContextTestSupport {
-    protected MockEndpoint a;
-    protected MockEndpoint b;
-    protected MockEndpoint error;
-
-    protected final Processor successOnRetryProcessor = new Processor() {
-        int count;
-        public void process(Exchange exchange) throws CamelException {
-            if (count++ == 0) {
-                exchange.getOut().setFault(true);
-                exchange.getOut().setBody(new CamelException("Failed the first time"));
-            }
-        }
-    };
-
-    @Test
-    public void testSuccessfulRetry() throws Exception {
-        a.expectedBodiesReceived("in");
-        b.expectedBodiesReceived("in");
-        error.expectedMessageCount(0);
-
-        template.sendBody("direct:start", "in");
-
-        MockEndpoint.assertIsSatisfied(a, b, error);
-    }
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        a = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
-        b = resolveMandatoryEndpoint("mock:b", MockEndpoint.class);
-        error = resolveMandatoryEndpoint("mock:error", MockEndpoint.class);
-    }
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() {
-                getContext().adapt(ExtendedCamelContext.class).addInterceptStrategy(new HandleFault());
-
-                errorHandler(
-                    deadLetterChannel("mock:error")
-                        .maximumRedeliveries(4)
-                        .loggingLevel(LoggingLevel.DEBUG));
-
-                from("direct:start")
-                    .to("mock:a")
-                    .process(successOnRetryProcessor)
-                    .to("mock:b");
-            }
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java
deleted file mode 100644
index d96d0a7..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/FaultRouteTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.processor.interceptor.HandleFault;
-import org.junit.Before;
-import org.junit.Test;
-
-public class FaultRouteTest extends ContextTestSupport {
-    protected MockEndpoint a;
-    protected MockEndpoint b;
-    protected MockEndpoint c;
-    protected MockEndpoint err;
-
-    @Test
-    public void testWithOut() throws Exception {
-        a.whenExchangeReceived(1, new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getOut().setBody("out");
-            }
-        });
-        a.expectedMessageCount(1);
-        b.expectedBodiesReceived("out");
-
-        template.sendBody("direct:start", "in");
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testWithFault() throws Exception {
-        a.whenExchangeReceived(1, new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getOut().setFault(true);
-                exchange.getOut().setBody("fault");
-            }
-        });
-        a.expectedMessageCount(1);
-        b.expectedMessageCount(0);
-
-        Exchange response = template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("in");
-            }
-        });
-        assertMockEndpointsSatisfied();
-
-        assertFalse("Fault should be removed", response.hasOut());
-        assertNotNull("Should have exception", response.getException());
-        assertEquals("fault", response.getException().getMessage());
-    }
-
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        a = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
-        b = resolveMandatoryEndpoint("mock:b", MockEndpoint.class);
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() {
-                getContext().adapt(ExtendedCamelContext.class).addInterceptStrategy(new HandleFault());
-
-                from("direct:start").to("mock:a").to("mock:b");
-            }
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/HandleFaultPerRouteTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/HandleFaultPerRouteTest.java
deleted file mode 100644
index c74a07b..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/HandleFaultPerRouteTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Test;
-
-public class HandleFaultPerRouteTest extends ContextTestSupport {
-
-    @Test
-    public void testHandleFaultPerRoute() throws Exception {
-        MockEndpoint a = getMockEndpoint("mock:a");
-        a.expectedMessageCount(1);
-
-        MockEndpoint b = getMockEndpoint("mock:b");
-        b.expectedMessageCount(1);
-
-        MockEndpoint c = getMockEndpoint("mock:c");
-        c.expectedMessageCount(1);
-
-        Exchange outA = template.send("direct:a", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getOut().setFault(true);
-                exchange.getOut().setBody(new IllegalArgumentException("A"));
-            }
-        });
-        assertTrue("Should be failed", outA.isFailed());
-        assertIsInstanceOf(IllegalArgumentException.class, outA.getException());
-        assertEquals("A", outA.getException().getMessage());
-
-        Exchange outB = template.send("direct:b", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getOut().setFault(true);
-                exchange.getOut().setBody(new IllegalArgumentException("B"));
-            }
-        });
-
-        assertTrue("Should be failed", outB.isFailed());
-        assertNull("Should not handle fault", outB.getException());
-        assertTrue(outB.getOut() != null && outB.getOut().isFault());
-        assertIsInstanceOf(IllegalArgumentException.class, outB.getOut().getBody());
-
-        Exchange outC = template.send("direct:c", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getOut().setFault(true);
-                exchange.getOut().setBody(new IllegalArgumentException("C"));
-            }
-        });
-
-        assertTrue("Should be failed", outC.isFailed());
-        assertIsInstanceOf(IllegalArgumentException.class, outC.getException());
-        assertEquals("C", outC.getException().getMessage());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                context.setHandleFault(true);
-
-                from("direct:a").to("mock:a");
-
-                from("direct:b").noHandleFault().to("mock:b");
-
-                from("direct:c").handleFault().to("mock:c");
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
index 9a51ab4..16454bf 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
@@ -43,21 +43,6 @@ public class PipelineTest extends ContextTestSupport {
         }
     }
 
-    /**
-     * Simple processor the copies the in to the fault and increments a counter.
-     */
-    private static final class InToFault implements Processor {
-        public void process(Exchange exchange) throws Exception {
-            exchange.getOut().setFault(true);
-            exchange.getOut().setBody(exchange.getIn().getBody());
-            Integer counter = exchange.getIn().getHeader("copy-counter", Integer.class);
-            if (counter == null) {
-                counter = 0;
-            }
-            exchange.getOut().setHeader("copy-counter", counter + 1);
-        }
-    }
-
     protected MockEndpoint resultEndpoint;
 
     @Test
@@ -153,8 +138,6 @@ public class PipelineTest extends ContextTestSupport {
                 
                 // Create a route that uses the  InToOut processor 3 times. the copy-counter header should be == 3
                 from("direct:b").process(new InToOut()).process(new InToOut()).process(new InToOut());
-                // Create a route that uses the  InToFault processor.. the last InToOut will not be called since the Fault occurs before.
-                from("direct:c").process(new InToOut()).process(new InToFault()).process(new InToOut());
             }
         };
     }
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/TrySetFaultFinallyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/TrySetFaultFinallyTest.java
deleted file mode 100644
index 487d695..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/TrySetFaultFinallyTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class TrySetFaultFinallyTest extends ContextTestSupport {
-
-    @Test
-    public void testSetFaultFinally() throws Exception {
-        getMockEndpoint("mock:a").expectedMessageCount(1);
-        getMockEndpoint("mock:b").expectedMessageCount(1);
-        getMockEndpoint("mock:c").expectedMessageCount(1);
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        template.requestBody("direct:start", "Hello World");
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("direct:start")
-                    .doTry()
-                        .to("mock:a")
-                        .setFaultBody(constant("Failed at A"))
-                    .doFinally()
-                        .to("mock:b")
-                        .to("mock:c")
-                    .end()
-                    .to("mock:result");
-            }
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/TrySetFaultTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/TrySetFaultTest.java
deleted file mode 100644
index f4873cd..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/TrySetFaultTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class TrySetFaultTest extends ContextTestSupport {
-
-    @Test
-    public void testSetFault() throws Exception {
-        // only mock:start gets the message as a fault body stops routing
-        getMockEndpoint("mock:start").expectedMessageCount(1);
-        getMockEndpoint("mock:a").expectedMessageCount(0);
-        getMockEndpoint("mock:catch-a").expectedMessageCount(0);
-        getMockEndpoint("mock:b").expectedMessageCount(0);
-        getMockEndpoint("mock:catch-b").expectedMessageCount(0);
-
-        template.requestBody("direct:start", "Hello World");
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("direct:start")
-                    .to("mock:start")
-                    .to("direct:a")
-                    .to("mock:a")
-                    .to("direct:b")
-                    .to("mock:b");
-
-                from("direct:a")
-                    .doTry()
-                        .setFaultBody(constant("Failed at A"))
-                    .doCatch(Exception.class)
-                        // fault will not throw an exception
-                        .to("mock:catch-a")
-                    .end();
-
-                from("direct:b")
-                    .doTry()
-                        .setFaultBody(constant("Failed at B"))
-                    .doCatch(Exception.class)
-                        // fault will not throw an exception
-                        .to("mock:catch-b")
-                    .end()
-                    .to("log:b");
-            }
-        };
-    }
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointWithHandleFaultTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointWithHandleFaultTest.java
deleted file mode 100644
index 2afc961..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointWithHandleFaultTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor.async;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class AsyncEndpointWithHandleFaultTest extends ContextTestSupport {
-
-    private static String beforeThreadName;
-    private static String afterThreadName;
-
-    @Test
-    public void testAsyncEndpoint() throws Exception {
-        getMockEndpoint("mock:before").expectedBodiesReceived("Hello Camel");
-        getMockEndpoint("mock:after").expectedMessageCount(0);
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        Exchange reply = template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setBody("Hello Camel");
-            }
-        });
-        assertNotNull(reply);
-        assertTrue(reply.isFailed());
-        assertNotNull(reply.getException());
-        assertEquals("Faulty Bye Camel", reply.getException().getMessage());
-
-        assertMockEndpointsSatisfied();
-
-        assertFalse("Should use different threads", beforeThreadName.equalsIgnoreCase(afterThreadName));
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                context.addComponent("async", new MyAsyncComponent());
-
-                // enable handle fault to ensure it works using async API
-                from("direct:start").handleFault()
-                        .to("mock:before")
-                        .to("log:before")
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                beforeThreadName = Thread.currentThread().getName();
-                            }
-                        })
-                        .to("async:bye:camel")
-                        .to("log:after")
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                afterThreadName = Thread.currentThread().getName();
-                                exchange.getOut().setFault(true);
-                                exchange.getOut().setBody("Faulty Bye Camel");
-                            }
-                        })
-                        .to("mock:after")
-                        .to("mock:result");
-            }
-        };
-    }
-
-}
\ No newline at end of file
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
index aaa5ed8..e263075 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
@@ -19,6 +19,7 @@ package org.apache.camel.processor.enricher;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 
+@Deprecated
 public class FailureProcessor implements Processor {
 
     private boolean error;
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToFaultTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToFaultTest.java
deleted file mode 100644
index 146ed3d..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSendToFaultTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor.intercept;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-public class InterceptSendToFaultTest extends ContextTestSupport {
-
-    @Test
-    public void testInterceptSendToFault() throws Exception {
-        getMockEndpoint("mock:foo").expectedMessageCount(0);
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-
-        String out = template.requestBody("direct:start", "Hello World", String.class);
-        assertEquals("Damn", out);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                interceptSendToEndpoint("mock:foo").setFaultBody(constant("Damn"));
-
-                from("direct:start").to("mock:foo").transform(constant("Bye World")).to("mock:result");
-            }
-        };
-    }
-}
\ No newline at end of file
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
index e88497a..533aa2c 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
@@ -33,7 +33,6 @@ import org.apache.camel.health.HealthCheckRepository;
 import org.apache.camel.health.HealthCheckService;
 import org.apache.camel.model.Model;
 import org.apache.camel.processor.interceptor.BacklogTracer;
-import org.apache.camel.processor.interceptor.HandleFault;
 import org.apache.camel.spi.AsyncProcessorAwaitManager;
 import org.apache.camel.spi.ClassResolver;
 import org.apache.camel.spi.Debugger;
@@ -136,7 +135,6 @@ public final class DefaultConfigurationConfigurer {
         camelContext.setMessageHistory(config.isMessageHistory());
         camelContext.setLogMask(config.isLogMask());
         camelContext.setLogExhaustedMessageBody(config.isLogExhaustedMessageBody());
-        camelContext.setHandleFault(config.isHandleFault());
         camelContext.setAutoStartup(config.isAutoStartup());
         camelContext.setAllowUseOriginalMessage(config.isAllowUseOriginalMessage());
         camelContext.setUseBreadcrumb(config.isUseBreadcrumb());
@@ -178,10 +176,6 @@ public final class DefaultConfigurationConfigurer {
         if (bt != null) {
             ecc.setExtension(BacklogTracer.class, bt);
         }
-        HandleFault hf = getSingleBeanOfType(registry, HandleFault.class);
-        if (hf != null) {
-            ecc.addInterceptStrategy(hf);
-        }
         InflightRepository ir = getSingleBeanOfType(registry, InflightRepository.class);
         if (ir != null) {
             ecc.setInflightRepository(ir);
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java
index 5d4a8d3..7824fdb 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchange.java
@@ -98,14 +98,12 @@ public final class DefaultExchange implements Exchange {
 
         exchange.setIn(getIn().copy());
         exchange.getIn().setBody(getIn().getBody());
-        exchange.getIn().setFault(getIn().isFault());
         if (getIn().hasHeaders()) {
             exchange.getIn().setHeaders(safeCopyHeaders(getIn().getHeaders()));
         }
         if (hasOut()) {
             exchange.setOut(getOut().copy());
             exchange.getOut().setBody(getOut().getBody());
-            exchange.getOut().setFault(getOut().isFault());
             if (getOut().hasHeaders()) {
                 exchange.getOut().setHeaders(safeCopyHeaders(getOut().getHeaders()));
             }
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchangeHolder.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchangeHolder.java
index 46fdde3..b3aaead 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchangeHolder.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultExchangeHolder.java
@@ -70,8 +70,6 @@ public class DefaultExchangeHolder implements Serializable {
     private String exchangeId;
     private Object inBody;
     private Object outBody;
-    private Boolean inFaultFlag = Boolean.FALSE;
-    private Boolean outFaultFlag = Boolean.FALSE;
     private Map<String, Object> inHeaders;
     private Map<String, Object> outHeaders;
     private Map<String, Object> properties;
@@ -110,10 +108,7 @@ public class DefaultExchangeHolder implements Serializable {
         payload.safeSetInHeaders(exchange, false);
         if (exchange.hasOut()) {
             payload.outBody = checkSerializableBody("out body", exchange, exchange.getOut().getBody());
-            payload.outFaultFlag = exchange.getOut().isFault();
             payload.safeSetOutHeaders(exchange, false);
-        } else {
-            payload.inFaultFlag = exchange.getIn().isFault();
         }
         if (includeProperties) {
             payload.safeSetProperties(exchange, false);
@@ -147,10 +142,7 @@ public class DefaultExchangeHolder implements Serializable {
         payload.safeSetInHeaders(exchange, allowSerializedHeaders);
         if (exchange.hasOut()) {
             payload.outBody = checkSerializableBody("out body", exchange, exchange.getOut().getBody());
-            payload.outFaultFlag = exchange.getOut().isFault();
             payload.safeSetOutHeaders(exchange, allowSerializedHeaders);
-        } else {
-            payload.inFaultFlag = exchange.getIn().isFault();
         }
         if (includeProperties) {
             payload.safeSetProperties(exchange, allowSerializedHeaders);
@@ -175,17 +167,11 @@ public class DefaultExchangeHolder implements Serializable {
         if (payload.inHeaders != null) {
             exchange.getIn().setHeaders(payload.inHeaders);
         }
-        if (payload.inFaultFlag != null) {
-            exchange.getIn().setFault(payload.inFaultFlag);
-        }
         if (payload.outBody != null) {
             exchange.getOut().setBody(payload.outBody);
             if (payload.outHeaders != null) {
                 exchange.getOut().setHeaders(payload.outHeaders);
             }
-            if (payload.outFaultFlag != null) {
-                exchange.getOut().setFault(payload.outFaultFlag);
-            }
         }
         if (payload.properties != null) {
             for (String key : payload.properties.keySet()) {
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/MessageSupport.java b/core/camel-support/src/main/java/org/apache/camel/support/MessageSupport.java
index d20a96d..4edb4b3 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/MessageSupport.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/MessageSupport.java
@@ -213,7 +213,6 @@ public abstract class MessageSupport implements Message, CamelContextAware, Data
 
         setMessageId(that.getMessageId());
         setBody(newBody);
-        setFault(that.isFault());
 
         // the headers may be the same instance if the end user has made some mistake
         // and set the OUT message with the same header instance of the IN message etc


[camel] 05/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 793a04b477bbffc9eda7a09e3cd216df818626d2
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Jul 20 14:18:16 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../camel/blueprint/CamelContextFactoryBean.java   | 10 ---
 .../camel/cdi/xml/CamelContextFactoryBean.java     | 11 ---
 .../spring/boot/CamelConfigurationProperties.java  |  7 --
 .../camel/spring/CamelContextFactoryBean.java      | 13 ----
 .../camel/spring/CamelContextFactoryBeanTest.java  |  2 -
 .../camel/impl/engine/DefaultRouteContext.java     |  1 -
 .../interceptor/HandleFaultInterceptor.java        | 81 ----------------------
 .../camel/main/DefaultConfigurationProperties.java | 24 -------
 .../camel-main-configuration-metadata.json         |  6 --
 .../apt/CoreEipAnnotationProcessorHelper.java      |  5 --
 .../apache/camel/main/parser/MyConfiguration.java  | 14 ----
 11 files changed, 174 deletions(-)

diff --git a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
index c4afd2f..5c80272 100644
--- a/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
+++ b/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/CamelContextFactoryBean.java
@@ -102,8 +102,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Blu
     @XmlAttribute
     private String delayer;
     @XmlAttribute
-    private String handleFault;
-    @XmlAttribute
     private String errorHandlerRef;
     @XmlAttribute
     private String autoStartup = "true";
@@ -589,14 +587,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Blu
         this.delayer = delayer;
     }
 
-    public String getHandleFault() {
-        return handleFault;
-    }
-
-    public void setHandleFault(String handleFault) {
-        this.handleFault = handleFault;
-    }
-
     public String getErrorHandlerRef() {
         return errorHandlerRef;
     }
diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
index af306a9..1267ce8 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/xml/CamelContextFactoryBean.java
@@ -92,9 +92,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Def
     private String delayer;
 
     @XmlAttribute
-    private String handleFault;
-
-    @XmlAttribute
     private String errorHandlerRef;
 
     @XmlAttribute
@@ -569,14 +566,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Def
         this.delayer = delayer;
     }
 
-    public String getHandleFault() {
-        return handleFault;
-    }
-
-    public void setHandleFault(String handleFault) {
-        this.handleFault = handleFault;
-    }
-
     public String getAutoStartup() {
         return autoStartup;
     }
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
index 5bb814c..54d3296 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
@@ -332,13 +332,6 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties
     private boolean logExhaustedMessageBody;
 
     /**
-     * Sets whether fault handling is enabled or not.
-     *
-     * Default is false.
-     */
-    private boolean handleFault;
-
-    /**
      * Sets whether the object should automatically start when Camel starts.
      * Important: Currently only routes can be disabled, as CamelContext's are always started.
      * Note: When setting auto startup false on CamelContext then that takes precedence
diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
index 856f240..57e852c 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
@@ -115,8 +115,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr
     @XmlAttribute
     private String delayer;
     @XmlAttribute
-    private String handleFault;
-    @XmlAttribute
     private String errorHandlerRef;
     @XmlAttribute @Metadata(defaultValue = "true")
     private String autoStartup;
@@ -717,17 +715,6 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr
         this.delayer = delayer;
     }
 
-    public String getHandleFault() {
-        return handleFault;
-    }
-
-    /**
-     * Sets whether fault handling is enabled or not (default is disabled).
-     */
-    public void setHandleFault(String handleFault) {
-        this.handleFault = handleFault;
-    }
-
     public String getAutoStartup() {
         return autoStartup;
     }
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
index a6b638d..4a9b0ac 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java
@@ -38,8 +38,6 @@ public class CamelContextFactoryBeanTest extends Assert {
 
     @Before
     public void setUp() throws Exception {
-
-        
         factory = new CamelContextFactoryBean();
         factory.setId("camelContext");
     }
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java
index b055e28..b776954 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/DefaultRouteContext.java
@@ -64,7 +64,6 @@ public class DefaultRouteContext implements RouteContext {
     private Boolean logMask;
     private Boolean logExhaustedMessageBody;
     private Boolean streamCache;
-    private Boolean handleFault;
     private Long delay;
     private Boolean autoStartup = Boolean.TRUE;
     private List<RoutePolicy> routePolicyList = new ArrayList<>();
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java b/core/camel-base/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java
deleted file mode 100644
index 11bef3e..0000000
--- a/core/camel-base/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.processor.interceptor;
-
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.CamelException;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.support.processor.DelegateAsyncProcessor;
-
-public class HandleFaultInterceptor extends DelegateAsyncProcessor {
-
-    public HandleFaultInterceptor() {
-    }
-
-    public HandleFaultInterceptor(Processor processor) {
-        super(processor);
-    }
-
-    @Override
-    public String toString() {
-        return "HandleFaultInterceptor[" + processor + "]";
-    }
-
-    @Override
-    public boolean process(final Exchange exchange, final AsyncCallback callback) {
-        return processor.process(exchange, new AsyncCallback() {
-            public void done(boolean doneSync) {
-                try {
-                    // handle fault after we are done
-                    handleFault(exchange);
-                } finally {
-                    // and let the original callback know we are done as well
-                    callback.done(doneSync);
-                }
-            }
-        });
-    }
-
-    /**
-     * Handles the fault message by converting it to an Exception
-     */
-    protected void handleFault(Exchange exchange) {
-        // Take the fault message out before we keep on going
-        Message msg = exchange.hasOut() ? exchange.getOut() : exchange.getIn();
-        if (msg.isFault()) {
-            final Object faultBody = msg.getBody();
-            if (faultBody != null && exchange.getException() == null) {
-                // remove fault as we are converting it to an exception
-                if (exchange.hasOut()) {
-                    exchange.setOut(null);
-                } else {
-                    exchange.setIn(null);
-                }
-                if (faultBody instanceof Throwable) {
-                    exchange.setException((Throwable) faultBody);
-                } else {
-                    // wrap it in an exception
-                    String data = exchange.getContext().getTypeConverter().convertTo(String.class, exchange, faultBody);
-                    exchange.setException(new CamelException(data));
-                }
-            }
-        }
-    }
-
-}
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index 0c8b011..855a239 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -53,7 +53,6 @@ public abstract class DefaultConfigurationProperties<T> {
     private boolean messageHistory = true;
     private boolean logMask;
     private boolean logExhaustedMessageBody;
-    private boolean handleFault;
     private boolean autoStartup = true;
     private boolean allowUseOriginalMessage;
     private boolean endpointRuntimeStatisticsEnabled;
@@ -438,19 +437,6 @@ public abstract class DefaultConfigurationProperties<T> {
         this.logExhaustedMessageBody = logExhaustedMessageBody;
     }
 
-    public boolean isHandleFault() {
-        return handleFault;
-    }
-
-    /**
-     * Sets whether fault handling is enabled or not.
-     *
-     * Default is false.
-     */
-    public void setHandleFault(boolean handleFault) {
-        this.handleFault = handleFault;
-    }
-
     public boolean isAutoStartup() {
         return autoStartup;
     }
@@ -924,16 +910,6 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
-     * Sets whether fault handling is enabled or not.
-     *
-     * Default is false.
-     */
-    public T withHandleFault(boolean handleFault) {
-        this.handleFault = handleFault;
-        return (T) this;
-    }
-
-    /**
      * Sets whether the object should automatically start when Camel starts.
      * Important: Currently only routes can be disabled, as CamelContext's are always started.
      * Note: When setting auto startup false on CamelContext then that takes precedence
diff --git a/core/camel-main/src/main/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/main/resources/META-INF/camel-main-configuration-metadata.json
index 2c18c42..4052ee6 100644
--- a/core/camel-main/src/main/resources/META-INF/camel-main-configuration-metadata.json
+++ b/core/camel-main/src/main/resources/META-INF/camel-main-configuration-metadata.json
@@ -122,12 +122,6 @@
 			"description":"Directory to load additional configuration files that contains configuration values that takes precedence over any other configuration. This can be used to refer to files that may have secret configuration that has been mounted on the file system for containers. You can specify a pattern to load from sub directories and a name pattern such as \/var\/app\/secret\/.properties, multiple directories can be separated by comma."
 		},
 		{
-			"name":"camel.main.handle-fault",
-			"type":"boolean",
-			"sourceType":"org.apache.camel.main.DefaultConfigurationProperties",
-			"description":"Sets whether fault handling is enabled or not. Default is false."
-		},
-		{
 			"name":"camel.main.hangup-interceptor-enabled",
 			"type":"boolean",
 			"sourceType":"org.apache.camel.main.MainConfigurationProperties",
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessorHelper.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessorHelper.java
index 396dda5..df08f15 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessorHelper.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/CoreEipAnnotationProcessorHelper.java
@@ -618,11 +618,6 @@ public class CoreEipAnnotationProcessorHelper {
         ep = new EipOption("logMask", "Log Mask", "attribute", "java.lang.String", false, "false", docComment, false, null, false, null, false, null, false);
         eipOptions.add(ep);
 
-        // trace
-        docComment = findJavaDoc(elementUtils, null, "handleFault", null, classElement, true);
-        ep = new EipOption("handleFault", "Handle Fault", "attribute", "java.lang.String", false, "", docComment, false, null, false, null, false, null, false);
-        eipOptions.add(ep);
-
         // delayer
         docComment = findJavaDoc(elementUtils, null, "delayer", null, classElement, true);
         ep = new EipOption("delayer", "Delayer", "attribute", "java.lang.String", false, "", docComment, false, null, false, null, false, null, false);
diff --git a/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfiguration.java b/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfiguration.java
index 4a6c260..489e06d 100644
--- a/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfiguration.java
+++ b/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfiguration.java
@@ -50,7 +50,6 @@ public class MyConfiguration {
     private boolean messageHistory = true;
     private boolean logMask;
     private boolean logExhaustedMessageBody;
-    private boolean handleFault;
     private boolean autoStartup = true;
     private boolean allowUseOriginalMessage;
     private boolean endpointRuntimeStatisticsEnabled;
@@ -435,19 +434,6 @@ public class MyConfiguration {
         this.logExhaustedMessageBody = logExhaustedMessageBody;
     }
 
-    public boolean isHandleFault() {
-        return handleFault;
-    }
-
-    /**
-     * Sets whether fault handling is enabled or not.
-     *
-     * Default is false.
-     */
-    public void setHandleFault(boolean handleFault) {
-        this.handleFault = handleFault;
-    }
-
     public boolean isAutoStartup() {
         return autoStartup;
     }


[camel] 09/11: CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-13755
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 573c4a51ba9205ed62afa399c3da1c49b6c25143
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Jul 21 18:48:43 2019 +0200

    CAMEL-13755: camel3 - Remove fault from camel-core/message and let it be component specific for camel-cxf and camel-spring-ws as its only used by SOAP-WS
---
 .../java/org/apache/camel/component/cxf/CxfConsumer.java  | 15 +++++++++++----
 .../camel/main/parser/MyConfigurationParserTest.java      |  2 +-
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
index cad4692..34cb15a 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
@@ -325,14 +325,21 @@ public class CxfConsumer extends DefaultConsumer implements Suspendable {
         }
 
         private void checkFailure(org.apache.camel.Exchange camelExchange, Exchange cxfExchange) throws Fault {
-            final Throwable t;
-            if (camelExchange.isFailed()) {
-                t = camelExchange.getException();
+            Throwable t = camelExchange.getException();
+            if (t == null) {
+                // SOAP faults can be stored as exceptions as message body (to be backwards compatible)
+                Object body = camelExchange.getMessage().getBody();
+                if (body instanceof Throwable) {
+                    t = (Throwable) body;
+                }
+            }
+
+            if (t != null) {
                 cxfExchange.getInMessage().put(FaultMode.class, FaultMode.UNCHECKED_APPLICATION_FAULT);
                 if (t instanceof Fault) {
                     cxfExchange.getInMessage().put(FaultMode.class, FaultMode.CHECKED_APPLICATION_FAULT);
                     throw (Fault)t;
-                } else if (t != null) {
+                } else {
                     // This is not a CXF Fault. Build the CXF Fault manually.
                     Fault fault = new Fault(t);
                     if (fault.getMessage() == null) {
diff --git a/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfigurationParserTest.java b/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfigurationParserTest.java
index 7bbed12..7c5833e 100644
--- a/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfigurationParserTest.java
+++ b/tooling/maven/camel-main-parser/src/test/java/org/apache/camel/main/parser/MyConfigurationParserTest.java
@@ -30,7 +30,7 @@ public class MyConfigurationParserTest extends TestCase {
         MainConfigurationParser parser = new MainConfigurationParser();
         List<ConfigurationModel> list = parser.parseConfigurationSource(fileName);
         assertNotNull(list);
-        assertEquals(41, list.size());
+        assertEquals(40, list.size());
 
         assertEquals("name", list.get(0).getName());
         assertEquals("java.lang.String", list.get(0).getJavaType());