camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r902698 - in /camel/branches/camel-1.x: ./ components/camel-cxf/src/main/java/org/apache/camel/component/cxf/ components/camel-cxf/src/test/java/org/apache/camel/component/cxf/
Date Mon, 25 Jan 2010 04:12:07 GMT
Author: ningjiang
Date: Mon Jan 25 04:12:06 2010
New Revision: 902698

URL: http://svn.apache.org/viewvc?rev=902698&view=rev
Log:
Merged revisions 902688 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r902688 | ningjiang | 2010-01-25 11:00:51 +0800 (Mon, 25 Jan 2010) | 1 line
  
  CAMEL-2397 copy the inMessage hears to the outMessage in CxfProducer
........

Modified:
    camel/branches/camel-1.x/   (props changed)
    camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
    camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
    camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java

Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 25 04:12:06 2010
@@ -1 +1 @@
-/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781
 923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783248,783363,783639,783704,785564,785584,785599,787206,787581,787598,787605,787928,788393,789121,789703,790560,790936,791379,791476,791767,792038,792381,792398,792899,793359,793518,793547-793555,793862,793935,794237,794368,794550,794967,795790,798027,798052,798063,798489,798864,799252,800340,800785,800797,801084,801196,801960,802307,802478,803559,807476,810751,812937,814493,816105,817654,818063,818182-818354,818744,818747,819475,819956,820152,820168,821272,821290,822655,823013,823018,823031,823102,823177,823575,824218,824721,825760,825765,828288,828333,832647,833285,833289,833350,833370,833381,833419,835511,880655,880667,883713,884525,884750,885876,887196,895119,896772,898201,901634
+/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692,758990,759362,759453,759887,759931,760003,760890,760909,760937,761194,761536,761583,761607,762047,762633,762650,762935,763095,763484,763551,765154,765686,765729,765743,765824,766016,766289,766584,766588,766590,766602,766673,767403,767824,768342,769239,769346,769368,769434,770172,770906,771303,773193,773446,773781,774192,774383,774658-774659,776198,776289,776504,776975,778102,778689-778701,779121,779143,779489,781314-781349,781775,781
 923,781974,781993,782557,782594,782681,782886,782918-782923,783204,783248,783363,783639,783704,785564,785584,785599,787206,787581,787598,787605,787928,788393,789121,789703,790560,790936,791379,791476,791767,792038,792381,792398,792899,793359,793518,793547-793555,793862,793935,794237,794368,794550,794967,795790,798027,798052,798063,798489,798864,799252,800340,800785,800797,801084,801196,801960,802307,802478,803559,807476,810751,812937,814493,816105,817654,818063,818182-818354,818744,818747,819475,819956,820152,820168,821272,821290,822655,823013,823018,823031,823102,823177,823575,824218,824721,825760,825765,828288,828333,832647,833285,833289,833350,833370,833381,833419,835511,880655,880667,883713,884525,884750,885876,887196,895119,896772,898201,901634,902688

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

Modified: camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java?rev=902698&r1=902697&r2=902698&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
(original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
Mon Jan 25 04:12:06 2010
@@ -148,6 +148,8 @@
             Message response) {
         org.apache.camel.Message out = exchange.getOut();
         if (response != null) {
+            // copy the InMessage header to OutMessage header
+            out.getHeaders().putAll(exchange.getIn().getHeaders());
             CxfHeaderHelper.propagateCxfToCamel(strategy, response, out.getHeaders());
             if (out instanceof CxfMessage) {
                 ((CxfMessage)out).setMessage(response);

Modified: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java?rev=902698&r1=902697&r2=902698&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
Mon Jan 25 04:12:06 2010
@@ -67,6 +67,7 @@
                 exchange.getIn().setBody(params);
                 exchange.getIn().setHeader(Client.REQUEST_CONTEXT , requestContext);
                 exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, ECHO_OPERATION);
+                exchange.getIn().setHeader(FILE_NAME, "testFile");
                 exchange.getProperties().put(TEST_KEY, TEST_VALUE);
             }
         });
@@ -83,6 +84,7 @@
                 exchange.getIn().setBody(params);
                 exchange.getIn().setHeader(Client.REQUEST_CONTEXT , requestContext);
                 exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, GREET_ME_OPERATION);
+                exchange.getIn().setHeader(FILE_NAME, "testFile");
             }
         });
         return exchange;

Modified: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java?rev=902698&r1=902697&r2=902698&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
Mon Jan 25 04:12:06 2010
@@ -50,6 +50,7 @@
     protected static final String SIMPLE_SERVER_ADDRESS = "http://localhost:28080/test";
     protected static final String JAXWS_SERVER_ADDRESS = "http://localhost:28081/test";
     protected static final String WRONG_SERVER_ADDRESS = "http://localhost:9999/test";
+    protected static final String FILE_NAME = "CamelFileName";
 
     private static final transient Log LOG = LogFactory.getLog(CxfProducerTest.class);
 
@@ -99,6 +100,10 @@
         assertNotNull(responseContext);
         assertEquals("We should get the response context here", "UTF-8", responseContext.get(org.apache.cxf.message.Message.ENCODING));
         assertEquals("reply body on Camel", "echo " + TEST_MESSAGE, result);
+        
+        // check the other camel header copying
+        String fileName = out.getHeader(FILE_NAME, String.class);
+        assertEquals("Should get the file name from out message header", "testFile", fileName);
 
     }
 
@@ -123,6 +128,10 @@
         assertNotNull(responseContext);
         assertEquals("Get the wrong wsdl opertion name", "{http://apache.org/hello_world_soap_http}greetMe",
responseContext.get("javax.xml.ws.wsdl.operation").toString());
         assertEquals("reply body on Camel", "Hello " + TEST_MESSAGE, result);
+        
+        // check the other camel header copying
+        String fileName = out.getHeader(FILE_NAME, String.class);
+        assertEquals("Should get the file name from out message header", "testFile", fileName);
     }
 
     protected String getSimpleEndpointUri() {
@@ -149,6 +158,7 @@
                 params.add(TEST_MESSAGE);
                 exchange.getIn().setBody(params);
                 exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, ECHO_OPERATION);
+                exchange.getIn().setHeader(FILE_NAME, "testFile");
             }
         });
         return exchange;
@@ -161,6 +171,7 @@
                 params.add(TEST_MESSAGE);
                 exchange.getIn().setBody(params);
                 exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, GREET_ME_OPERATION);
+                exchange.getIn().setHeader(FILE_NAME, "testFile");
             }
         });
         return exchange;



Mime
View raw message