Author: ningjiang
Date: Wed May 18 10:50:26 2011
New Revision: 1124183
URL: http://svn.apache.org/viewvc?rev=1124183&view=rev
Log:
CAMEL-3987 Doesn't store the exception into to out message as a fault message
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSoapFaultTest.java
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java?rev=1124183&r1=1124182&r2=1124183&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
Wed May 18 10:50:26 2011
@@ -75,9 +75,6 @@ public class CxfClientCallback extends C
camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
endpoint.getCxfBinding().populateExchangeFromCxfResponse(camelExchange,
cxfExchange,
ctx);
- // set the camelExchange outbody with the exception
- camelExchange.getOut().setFault(true);
- camelExchange.getOut().setBody(ex);
}
if (LOG.isDebugEnabled()) {
LOG.debug(Thread.currentThread().getName() + " calling
handleException");
Modified:
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java?rev=1124183&r1=1124182&r2=1124183&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
(original)
+++
camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
Wed May 18 10:50:26 2011
@@ -135,11 +135,6 @@ public class CxfProducer extends Default
camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
endpoint.getCxfBinding().populateExchangeFromCxfResponse(camelExchange,
cxfExchange,
responseContext);
- if (camelExchange.getException() != null) {
- // set the camelExchange outbody with the exception
- camelExchange.getOut().setFault(true);
-
camelExchange.getOut().setBody(camelExchange.getException());
- }
}
}
}
Modified:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSoapFaultTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSoapFaultTest.java?rev=1124183&r1=1124182&r2=1124183&view=diff
==============================================================================
---
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSoapFaultTest.java
(original)
+++
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerSoapFaultTest.java
Wed May 18 10:50:26 2011
@@ -81,8 +81,6 @@ public class CxfProducerSoapFaultTest ex
// assert we got the exception first
assertNotNull("except to get the exception", exception);
assertTrue("Get a wrong soap fault", exception instanceof
BadRecordLitFault);
- // check out the message body with the fault message, now we just put
the Exception as the fault message
- assertEquals("Get a wrong message body", exception,
exchange.getOut().getBody());
// check out the message header which is copied from in message
String fileName = exchange.getOut().getHeader(Exchange.FILE_NAME,
String.class);
assertEquals("Should get the file name from out message header",
"testFile", fileName);