servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1377983 - in /servicemix/components/trunk: ./ engines/servicemix-camel/ engines/servicemix-camel/src/main/java/org/apache/servicemix/camel/ engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/
Date Tue, 28 Aug 2012 06:23:59 GMT
Author: ffang
Date: Tue Aug 28 06:23:58 2012
New Revision: 1377983

URL: http://svn.apache.org/viewvc?rev=1377983&view=rev
Log:
[SMX4COMP-941]upgrade camel to 2.10.0

Modified:
    servicemix/components/trunk/engines/servicemix-camel/pom.xml
    servicemix/components/trunk/engines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JavaCamelRouteTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutPipelineTest.java
    servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiOperationCamelTest.java
    servicemix/components/trunk/pom.xml

Modified: servicemix/components/trunk/engines/servicemix-camel/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/pom.xml?rev=1377983&r1=1377982&r2=1377983&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/pom.xml (original)
+++ servicemix/components/trunk/engines/servicemix-camel/pom.xml Tue Aug 28 06:23:58 2012
@@ -139,6 +139,25 @@
             <artifactId>spring-osgi-core</artifactId>
             <scope>provided</scope>
             <optional>true</optional>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>org.springframework.context</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>org.springframework.beans</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>org.springframework.core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.springframework</groupId>
+                    <artifactId>org.springframework.aop</artifactId>
+                </exclusion>
+            </exclusions>
+
         </dependency>        
         <dependency>
             <groupId>xerces</groupId>

Modified: servicemix/components/trunk/engines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java?rev=1377983&r1=1377982&r2=1377983&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
Tue Aug 28 06:23:58 2012
@@ -16,7 +16,9 @@
  */
 package org.apache.servicemix.camel;
 
+import java.io.UnsupportedEncodingException;
 import java.net.URISyntaxException;
+import java.net.URLDecoder;
 import java.util.Map;
 import java.util.concurrent.Callable;
 
@@ -158,7 +160,9 @@ public class JbiEndpoint extends Default
                 this.destinationUri = destinationUri.substring(0, idx);
 
                 String filter = (String) params.get("headerFilterStrategy");
+                
                 if (StringUtils.hasLength(filter)) {
+                    filter = URLDecoder.decode(filter, "UTF-8");
                     Registry registry = jbiComponent.getCamelContext().getRegistry();
                     if (filter.indexOf('#') != -1) {
                         filter = filter.substring(1);
@@ -184,6 +188,8 @@ public class JbiEndpoint extends Default
             }
         } catch (URISyntaxException e) {
             throw new JbiException(e);
+        } catch (UnsupportedEncodingException e) {
+            throw new JbiException(e);
         }
     }
 

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JavaCamelRouteTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JavaCamelRouteTest.java?rev=1377983&r1=1377982&r2=1377983&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JavaCamelRouteTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JavaCamelRouteTest.java
Tue Aug 28 06:23:58 2012
@@ -16,6 +16,9 @@
  */
 package org.apache.servicemix.camel;
 
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+
 import javax.jbi.messaging.MessageExchange;
 
 /**
@@ -35,6 +38,11 @@ public class JavaCamelRouteTest extends 
     protected void checkResult(MessageExchange exchange) {
         assertNotNull(exchange.getMessage("out"));
         assertNotNull(exchange.getMessage("out").getProperty("operation"));
-        assertEquals(exchange.getMessage("out").getProperty("operation").toString(), "{http://hello}echo");
+        String operation = exchange.getMessage("out").getProperty("operation").toString();
+        try {
+            assertEquals(URLDecoder.decode(operation, "UTF-8"), "{http://hello}echo");
+        } catch (UnsupportedEncodingException e) {
+            throw new JbiException(e);
+        }
     }
 }

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutPipelineTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutPipelineTest.java?rev=1377983&r1=1377982&r2=1377983&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutPipelineTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOutPipelineTest.java
Tue Aug 28 06:23:58 2012
@@ -84,7 +84,8 @@ public class JbiInOutPipelineTest extend
         assertNotNull("Expecting to receive a DONE/ERROR MessageExchange", client.receive(10000));
         client.done(exchange);
         assertEquals(ExchangeStatus.DONE, exchange.getStatus());
-        assertNull(exchange.getOutMessage().getProperty(HEADER_TRANSFORMER));
+        Object obj = exchange.getOutMessage().getProperty(HEADER_TRANSFORMER);
+        assertNull(obj);
         Thread.sleep(1000);
     }
 

Modified: servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiOperationCamelTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiOperationCamelTest.java?rev=1377983&r1=1377982&r2=1377983&view=diff
==============================================================================
--- servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiOperationCamelTest.java
(original)
+++ servicemix/components/trunk/engines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiOperationCamelTest.java
Tue Aug 28 06:23:58 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.servicemix.camel;
 
+import java.net.URLDecoder;
 import java.util.List;
 
 import javax.xml.namespace.QName;
@@ -43,7 +44,9 @@ public class JbiOperationCamelTest exten
         
         inonly.assertIsSatisfied();
         Exchange exchange = inonly.getExchanges().get(0);
-        assertEquals(OPERATION, JbiBinding.getOperation(exchange));
+        String str1 = URLDecoder.decode(OPERATION.toString(), "UTF-8");
+        String str2 = URLDecoder.decode(JbiBinding.getOperation(exchange).toString(), "UTF-8");
+        assertEquals(str1, str2);
     }
     
     public void testInOnlySetOperationOnCamelExchange() throws Exception {
@@ -78,7 +81,9 @@ public class JbiOperationCamelTest exten
                 
                 from("jbi:service:urn:test:in-only").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
-                        assertEquals(OPERATION, JbiBinding.getOperation(exchange));
+                        String str1 = URLDecoder.decode(OPERATION.toString(), "UTF-8");
+                        String str2 = URLDecoder.decode(JbiBinding.getOperation(exchange).toString(),
"UTF-8");
+                        assertEquals(str1, str2);
                     }                    
                 }).to("mock:in-only");
             }

Modified: servicemix/components/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/pom.xml?rev=1377983&r1=1377982&r2=1377983&view=diff
==============================================================================
--- servicemix/components/trunk/pom.xml (original)
+++ servicemix/components/trunk/pom.xml Tue Aug 28 06:23:58 2012
@@ -85,7 +85,7 @@
         <activemq.version>5.5.1</activemq.version>
         
         <!-- Camel -->
-        <camel.version>2.9.0</camel.version>
+        <camel.version>2.10.0</camel.version>
 
         <!-- CXF -->
         <cxf.version>2.6.1</cxf.version>



Mime
View raw message