camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1370796 - in /camel/branches/camel-2.9.x: ./ components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/ components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/
Date Wed, 08 Aug 2012 14:54:07 GMT
Author: ningjiang
Date: Wed Aug  8 14:54:07 2012
New Revision: 1370796

URL: http://svn.apache.org/viewvc?rev=1370796&view=rev
Log:
Merged revisions 1370787 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1370787 | ningjiang | 2012-08-08 22:36:51 +0800 (Wed, 08 Aug 2012) | 9 lines
  
  Merged revisions 1370783 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1370783 | ningjiang | 2012-08-08 22:22:25 +0800 (Wed, 08 Aug 2012) | 1 line
    
    CAMEL-5405 keep on fixing the CXF Transport loses HTTP Matrix parameters
  ........
................

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/DefaultCxfMesssageMapper.java
    camel/branches/camel-2.9.x/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/DefaultCxfMessageMapperTest.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1370783
  Merged /camel/branches/camel-2.10.x:r1370787

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/DefaultCxfMesssageMapper.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/DefaultCxfMesssageMapper.java?rev=1370796&r1=1370795&r2=1370796&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/DefaultCxfMesssageMapper.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/DefaultCxfMesssageMapper.java
Wed Aug  8 14:54:07 2012
@@ -32,7 +32,9 @@ import org.slf4j.LoggerFactory;
  */
 public class DefaultCxfMesssageMapper implements CxfMessageMapper {
     private static final Logger LOG = LoggerFactory.getLogger(DefaultCxfMesssageMapper.class);
-
+    private static final String CXF_HTTP_REQUEST = "HTTP.REQUEST";
+    private static final String CXF_HTTP_RESPONSE = "HTTP.RESPONSE";
+    
     public Message createCxfMessageFromCamelExchange(Exchange camelExchange, 
             HeaderFilterStrategy headerFilterStrategy) {
         
@@ -63,6 +65,10 @@ public class DefaultCxfMesssageMapper im
         answer.put(org.apache.cxf.message.Message.ENCODING, enc);
         answer.put(org.apache.cxf.message.Message.QUERY_STRING, queryString);
         
+        Object request = camelMessage.getHeader(Exchange.HTTP_SERVLET_REQUEST);
+        answer.put(CXF_HTTP_REQUEST, request);
+        Object response = camelMessage.getHeader(Exchange.HTTP_SERVLET_RESPONSE);
+        answer.put(CXF_HTTP_RESPONSE, response);
         // TODO propagate security context
         
         LOG.trace("Processing {}, requestContentType = {}, acceptContentTypes = {}, encoding
= {}, path = {}, basePath = {}, verb = {}",

Modified: camel/branches/camel-2.9.x/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/DefaultCxfMessageMapperTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/DefaultCxfMessageMapperTest.java?rev=1370796&r1=1370795&r2=1370796&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/DefaultCxfMessageMapperTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/DefaultCxfMessageMapperTest.java
Wed Aug  8 14:54:07 2012
@@ -77,6 +77,10 @@ public class DefaultCxfMessageMapperTest
         EasyMock.expectLastCall().andReturn("GET");
         camelMessage.getHeader(Exchange.HTTP_QUERY, String.class);
         EasyMock.expectLastCall().andReturn("");
+        camelMessage.getHeader(Exchange.HTTP_SERVLET_REQUEST);
+        EasyMock.expectLastCall().andReturn(null);
+        camelMessage.getHeader(Exchange.HTTP_SERVLET_RESPONSE);
+        EasyMock.expectLastCall().andReturn(null);
 
         camelMessage.getBody(InputStream.class);
         EasyMock.expectLastCall().andReturn(



Mime
View raw message