camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: AW: svn commit: r1062776 - in /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf: transport/CamelDestination.java util/CxfHeaderHelper.java
Date Mon, 24 Jan 2011 15:54:45 GMT
Uups ... I mean hi claus. Chatted too much with hadrian recently.

Btw. I really apreciate that you have an eye on the code quality.

Christian



Am 24.01.2011 um 16:25 schrieb Christian Schneider <cschneider@talend.com>:

> Hi Hadrian,
> 
> I will add a test after the 2.6.0 release. I had to  rush a bit to get this into the
release as hadrian had already started. I currently run a fulltest on hudson. Till now we
have no regressions. My test would not help with regressions right now as I can only test
my case.
> 
> Christian
> 
> 
> -----Urspr√ľngliche Nachricht-----
> Von: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
> Gesendet: Montag, 24. Januar 2011 15:01
> An: dev@camel.apache.org
> Cc: commits@camel.apache.org
> Betreff: Re: svn commit: r1062776 - in /camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf:
transport/CamelDestination.java util/CxfHeaderHelper.java
> 
> Hi Christian
> 
> Please try always to add unit test when you commit a change in any of the components.
Its really important that we improve testing coverage.
> This is not a trivial change and it could potential affect something.
> 
> 
> On Mon, Jan 24, 2011 at 2:55 PM,  <cschneider@apache.org> wrote:
>> Author: cschneider
>> Date: Mon Jan 24 13:55:22 2011
>> New Revision: 1062776
>> 
>> URL: http://svn.apache.org/viewvc?rev=1062776&view=rev
>> Log:
>> CAMEL-3581 Forward http response code from CXF to Camel
>> 
>> Modified:
>>    
>> camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/compon
>> ent/cxf/transport/CamelDestination.java
>>    
>> camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/compon
>> ent/cxf/util/CxfHeaderHelper.java
>> 
>> Modified: 
>> camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/compon
>> ent/cxf/transport/CamelDestination.java
>> URL: 
>> http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main
>> /java/org/apache/camel/component/cxf/transport/CamelDestination.java?r
>> ev=1062776&r1=1062775&r2=1062776&view=diff
>> ======================================================================
>> ========
>> --- 
>> camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/compon
>> ent/cxf/transport/CamelDestination.java (original)
>> +++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/co
>> +++ mponent/cxf/transport/CamelDestination.java Mon Jan 24 13:55:22 
>> +++ 2011
>> @@ -51,6 +51,8 @@ import org.apache.cxf.wsdl.EndpointRefer
>> 
>>  /**
>>  * @version $Revision$
>> + *
>> + * Forwards messages from Camel to CXF and the CXF response back to 
>> + Camel
>>  */
>>  public class CamelDestination extends AbstractDestination implements 
>> Configurable {
>>     protected static final String BASE_BEAN_NAME_SUFFIX = 
>> ".camel-destination"; @@ -243,6 +245,9 @@ public class 
>> CamelDestination extends Ab
>>                                             
>> camelExchange.getOut().getHeaders(), camelExchange);
>>     }
>> 
>> +    /**
>> +     * Receives a response from CXF and forwards it to the camel 
>> + route the request came in from
>> +     */
>>     private class CamelOutputStream extends CachedOutputStream {
>>         private Message outMessage;
>> 
>> 
>> Modified: 
>> camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/compon
>> ent/cxf/util/CxfHeaderHelper.java
>> URL: 
>> http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main
>> /java/org/apache/camel/component/cxf/util/CxfHeaderHelper.java?rev=106
>> 2776&r1=1062775&r2=1062776&view=diff
>> ======================================================================
>> ========
>> --- 
>> camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/compon
>> ent/cxf/util/CxfHeaderHelper.java (original)
>> +++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/co
>> +++ mponent/cxf/util/CxfHeaderHelper.java Mon Jan 24 13:55:22 2011
>> @@ -85,9 +85,9 @@ public final class CxfHeaderHelper {
>>             return;
>>         }
>> 
>> +        // Copy the CXF protocol headers to the camel headers
>>         Map<String, List<String>> cxfHeaders =
>>             
>> CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
>> -
>>         if (cxfHeaders != null) {
>>             for (Map.Entry<String, List<String>> entry : 
>> cxfHeaders.entrySet()) {
>>                 if 
>> (!strategy.applyFilterToExternalHeaders(entry.getKey(), 
>> entry.getValue(), exchange)) { @@ -116,6 +116,13 @@ public final class 
>> CxfHeaderHelper {
>>         if (value != null && 
>> !strategy.applyFilterToExternalHeaders(key, value, exchange)) {
>>             headers.put(key, value);
>>         }
>> +
>> +        // propagate response code
>> +        key = Message.RESPONSE_CODE;
>> +        value = message.get(key);
>> +        if (value != null && 
>> + !strategy.applyFilterToExternalHeaders(key, value, exchange)) {
>> +            headers.put(Exchange.HTTP_RESPONSE_CODE, value);
>> +        }
>>     }
>> 
>>  }
>> 
>> 
>> 
> 
> 
> 
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
> 

Mime
View raw message