camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [3/3] git commit: CAMEL-7338 Just set the out message header once we get the response from CXF server with thanks to Joe
Date Thu, 03 Apr 2014 03:54:09 GMT
CAMEL-7338 Just set the out message header once we get the response from CXF server with thanks
to Joe


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3910e194
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3910e194
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3910e194

Branch: refs/heads/camel-2.12.x
Commit: 3910e194622a35b48dc7b129440cd34ad001a586
Parents: c9bf52c
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu Apr 3 11:52:29 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu Apr 3 11:53:23 2014 +0800

----------------------------------------------------------------------
 .../java/org/apache/camel/component/cxf/CxfClientCallback.java   | 4 ----
 .../main/java/org/apache/camel/component/cxf/CxfProducer.java    | 2 --
 .../java/org/apache/camel/component/cxf/DefaultCxfBinding.java   | 3 +++
 3 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3910e194/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
index b33d0b9..bcef9cf 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
@@ -57,8 +57,6 @@ public class CxfClientCallback extends ClientCallback {
             // for one way messages callback is already called in 
             // process method of org.apache.camel.component.cxf.CxfProducer
             if (!boi.getOperationInfo().isOneWay()) {
-                // copy the InMessage header to OutMessage header
-                camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
                 binding.populateExchangeFromCxfResponse(camelExchange, cxfExchange, ctx);
                 camelAsyncCallback.done(false);
             }
@@ -91,8 +89,6 @@ public class CxfClientCallback extends ClientCallback {
             // for one way messages callback is already called in 
             // process method of org.apache.camel.component.cxf.CxfProducer
             if (!boi.getOperationInfo().isOneWay()) {
-                // copy the InMessage header to OutMessage header
-                camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
                 binding.populateExchangeFromCxfResponse(camelExchange, cxfExchange, ctx);
                 camelAsyncCallback.done(false);
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/3910e194/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
index fbaf780..017f945 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
@@ -154,8 +154,6 @@ public class CxfProducer extends DefaultProducer implements AsyncProcessor
{
         } finally {
             // bind the CXF response to Camel exchange
             if (!boi.getOperationInfo().isOneWay()) {
-                // copy the InMessage header to OutMessage header
-                camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
                 endpoint.getCxfBinding().populateExchangeFromCxfResponse(camelExchange, cxfExchange,
                         responseContext);
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/3910e194/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
index fa1735a..ca1e6af 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
@@ -150,6 +150,9 @@ public class DefaultCxfBinding implements CxfBinding, HeaderFilterStrategyAware
         }
         
         LOG.trace("Populate exchange from CXF response message: {}", cxfMessage);
+
+        // copy the InMessage header to OutMessage header
+        camelExchange.getOut().getHeaders().putAll(camelExchange.getIn().getHeaders());
         
         // propagate body
         camelExchange.getOut().setBody(DefaultCxfBinding.getContentFromCxf(cxfMessage, 


Mime
View raw message