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 <claus.ib...@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;
         }

Reply via email to