camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r811436 - in /camel/branches/camel-1.x/components/camel-cxf/src: main/java/org/apache/camel/component/cxf/CxfExchange.java test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
Date Fri, 04 Sep 2009 15:09:37 GMT
Author: wtam
Date: Fri Sep  4 15:09:37 2009
New Revision: 811436

URL: http://svn.apache.org/viewvc?rev=811436&view=rev
Log:
[CAMEL-1983] fixed test, and shouldn't need to copy message in the exchange to begin with

Modified:
    camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
    camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java

Modified: camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java?rev=811436&r1=811435&r2=811436&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
(original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
Fri Sep  4 15:09:37 2009
@@ -59,28 +59,6 @@
         super(exchange);
         this.exchange = exchange.getExchange();
         
-        if (DataFormat.MESSAGE == exchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY,
DataFormat.class)) {
-            // message body is an input stream so it is not copied to new exchange
-            return;
-        }
-        
-        // Just make sure the wrapped CXF message be copied
-        
-        CxfMessage message = (CxfMessage)exchange.getIn();
-        if (message != null) {
-            this.setIn(new CxfMessage(message.getMessage()));
-        }
-        
-        message = (CxfMessage) exchange.getOut(false);
-        if (message != null) {
-            this.setOut(new CxfMessage(message.getMessage()));
-        }
-        
-        message = (CxfMessage) exchange.getFault(false);
-        if (message != null) {
-            this.setFault(new CxfMessage(message.getMessage()));
-        }
-        
     }
 
     public CxfExchange(CamelContext context, ExchangePattern pattern, Message inMessage)
{

Modified: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java?rev=811436&r1=811435&r2=811436&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
(original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
Fri Sep  4 15:09:37 2009
@@ -609,7 +609,7 @@
     public static class InsertResponseOutHeaderProcessor implements Processor {
 
         public void process(Exchange exchange) throws Exception {
-            CxfMessage message = exchange.getOut().getBody(CxfMessage.class);
+            CxfMessage message = exchange.getIn().getBody(CxfMessage.class);
             Map responseContext = (Map)message.getMessage().get(Client.RESPONSE_CONTEXT);
             List<SoapHeader> soapHeaders = (List)responseContext.get(Header.HEADER_LIST);
             



Mime
View raw message