camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1187290 - /camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
Date Fri, 21 Oct 2011 10:38:21 GMT
Author: ningjiang
Date: Fri Oct 21 10:38:20 2011
New Revision: 1187290

URL: http://svn.apache.org/viewvc?rev=1187290&view=rev
Log:
CAMEL-4570 DefaultCxfBinding should take consideration of the Exchange.HTTP_RESPONSE_CODE

Modified:
    camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java

Modified: camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java?rev=1187290&r1=1187289&r2=1187290&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
(original)
+++ camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
Fri Oct 21 10:38:20 2011
@@ -548,18 +548,20 @@ public class DefaultCxfBinding implement
         }
             
         for (Map.Entry<String, Object> entry : camelHeaders.entrySet()) {    
+            // put response code in request context so it will be copied to CXF message's
property
+            if (Message.RESPONSE_CODE.equals(entry.getKey()) || Exchange.HTTP_RESPONSE_CODE.equals(entry.getKey()))
{
+                LOG.debug("Propagate to CXF header: {} value: {}", Message.RESPONSE_CODE,
entry.getValue());
+                cxfContext.put(Message.RESPONSE_CODE, entry.getValue());
+                continue;
+            }
+
             // this header should be filtered, continue to the next header
             if (headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(),
camelExchange)) {
                 continue;
             }
             
-            LOG.trace("Propagate to CXF header: {} value: {}", entry.getKey(), entry.getValue());
+            LOG.debug("Propagate to CXF header: {} value: {}", entry.getKey(), entry.getValue());
             
-            // put response code in request context so it will be copied to CXF message's
property
-            if (Message.RESPONSE_CODE.equals(entry.getKey())) {
-                cxfContext.put(entry.getKey(), entry.getValue());
-                continue;
-            }
             
             // put SOAP/protocol header list in exchange
             if (Header.HEADER_LIST.equals(entry.getKey())) {



Mime
View raw message