camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r770910 - in /camel/branches/camel-1.x: ./ components/camel-cxf/src/main/java/org/apache/camel/component/cxf/ tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/ tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/
Date Sat, 02 May 2009 08:26:34 GMT
Author: ningjiang
Date: Sat May  2 08:26:32 2009
New Revision: 770910

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

........
  r770906 | ningjiang | 2009-05-02 15:09:28 +0800 (Sat, 02 May 2009) | 1 line
  
  CAMEL-1581 Added an integration test for camel-cxf and camel-jms
........

Added:
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
      - copied unchanged from r770906, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterConsumerTest.java
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareRequest.java
      - copied unchanged from r770906, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareRequest.java
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
      - copied unchanged from r770906, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsPrepareResponse.java
    camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
      - copied, changed from r770906, camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
Modified:
    camel/branches/camel-1.x/   (props changed)
    camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
    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/main/java/org/apache/camel/component/cxf/CxfExchange.java

Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May  2 08:26:32 2009
@@ -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
+/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

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/CamelInvoker.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java?rev=770910&r1=770909&r2=770910&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
(original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
Sat May  2 08:26:32 2009
@@ -97,7 +97,7 @@
         Message outMessage = null;
         if (result.isFailed()) {
             // The exception will be send back to the soap client
-            CxfMessage fault = result.getFault();
+            org.apache.camel.Message fault = result.getFault();
             outMessage = exchange.getInFaultMessage();
             if (outMessage == null) {
                 outMessage = endpoint.getBinding().createMessage();

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=770910&r1=770909&r2=770910&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
Sat May  2 08:26:32 2009
@@ -47,6 +47,7 @@
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageContentsList;
+import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 
@@ -89,7 +90,10 @@
     public static Message createCxfMessage(HeaderFilterStrategy strategy, CxfExchange exchange)
{
 
         Message answer = exchange.getInMessage();
-        CxfMessage in = exchange.getIn();
+        if (answer == null) {
+            answer = new MessageImpl();
+        }
+        org.apache.camel.Message in = exchange.getIn();
 
         // Check the body if the POJO parameter list first
         try {
@@ -142,10 +146,14 @@
 
     public static void storeCxfResponse(HeaderFilterStrategy strategy, CxfExchange exchange,
             Message response) {
-        CxfMessage out = exchange.getOut();
+        org.apache.camel.Message out = exchange.getOut();
         if (response != null) {
             CxfHeaderHelper.propagateCxfToCamel(strategy, response, out.getHeaders());
-            out.setMessage(response);
+            if (out instanceof CxfMessage) {
+                ((CxfMessage)out).setMessage(response);
+            } else {
+                out.setBody(response.get(List.class));
+            }
             DataFormat dataFormat = (DataFormat) exchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY);
             if (dataFormat.equals(DataFormat.MESSAGE)) {
                 out.setBody(response.getContent(InputStream.class));
@@ -196,14 +204,14 @@
     }
 
     public static void storeCxfResponse(CxfExchange exchange, Object response) {
-        CxfMessage out = exchange.getOut();
+        org.apache.camel.Message out = exchange.getOut();
         if (response != null) {
             out.setBody(response);
         }
     }
 
     public static void storeCxfFault(CxfExchange exchange, Message message) {
-        CxfMessage fault = exchange.getFault();
+        org.apache.camel.Message fault = exchange.getFault();
         if (fault != null) {
             fault.setBody(getBody(message));
         }
@@ -392,3 +400,4 @@
     }
 }
 
+

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=770910&r1=770909&r2=770910&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
Sat May  2 08:26:32 2009
@@ -81,26 +81,6 @@
     }
 
     @Override
-    public CxfMessage getIn() {
-        return (CxfMessage) super.getIn();
-    }
-
-    @Override
-    public CxfMessage getOut() {
-        return (CxfMessage) super.getOut();
-    }
-
-    @Override
-    public CxfMessage getOut(boolean lazyCreate) {
-        return (CxfMessage) super.getOut(lazyCreate);
-    }
-
-    @Override
-    public CxfMessage getFault() {
-        return (CxfMessage) super.getFault();
-    }
-
-    @Override
     protected org.apache.camel.Message createFaultMessage() {
         return new CxfMessage();
     }
@@ -124,11 +104,19 @@
     }
 
     public Message getInMessage() {
-        return getIn().getMessage();
+        if (getIn() instanceof CxfMessage) {
+            return ((CxfMessage)getIn()).getMessage();
+        } else {
+            return null;
+        }
     }
 
     public Message getOutMessage() {
-        return getOut().getMessage();
+        if (getOut() instanceof CxfMessage) {
+            return ((CxfMessage)getOut()).getMessage();
+        } else {
+            return null;
+        }
     }
 
     public Message getOutFaultMessage() {
@@ -148,12 +136,12 @@
     }
 
     @Override
-    protected CxfMessage createInMessage() {
+    protected org.apache.camel.Message createInMessage() {
         return new CxfMessage();
     }
 
     @Override
-    protected CxfMessage createOutMessage() {
+    protected org.apache.camel.Message createOutMessage() {
         return new CxfMessage();
     }
 }

Copied: camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
(from r770906, camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml?p2=camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml&p1=camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml&r1=770906&r2=770910&rev=770910&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
(original)
+++ camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterConsumerTest-context.xml
Sat May  2 08:26:32 2009
@@ -17,12 +17,12 @@
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:cxf="http://camel.apache.org/schema/cxf"
+       xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
 
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+       http://activemq.apache.org/camel/schema/cxfEndpoint http://activemq.apache.org/camel/schema/cxfEndpoint/camel-cxf.xsd
+       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
     ">
 
  <import resource="classpath:activemq.xml" />
@@ -54,7 +54,7 @@
   </bean>
 
   <!-- START SNIPPET: example -->
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
+  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
     <route>        
         <from uri="cxf://bean:serviceEndpoint"/>
         <process ref="jmsPrepareRequest"/>



Mime
View raw message