You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/07/27 11:30:17 UTC
svn commit: r798083 - in /camel/branches/camel-1.x: ./ components/camel-cxf/
components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/
components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/
Author: ningjiang
Date: Mon Jul 27 09:30:16 2009
New Revision: 798083
URL: http://svn.apache.org/viewvc?rev=798083&view=rev
Log:
Merged revisions 798052,798063 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r798052 | ningjiang | 2009-07-27 15:23:21 +0800 (Mon, 27 Jul 2009) | 1 line
CAMEL-1856 added a Junit test to show how to use JBIBinding with Camel transport
........
r798063 | ningjiang | 2009-07-27 15:43:50 +0800 (Mon, 27 Jul 2009) | 1 line
CAMEL-1856 removed the System.out.print
........
Added:
camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java
- copied, changed from r798052, camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java
camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java
- copied, changed from r798052, camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java
camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml
- copied, changed from r798052, camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml
Modified:
camel/branches/camel-1.x/ (props changed)
camel/branches/camel-1.x/components/camel-cxf/pom.xml
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 27 09:30:16 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,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
+/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
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-1.x/components/camel-cxf/pom.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/pom.xml?rev=798083&r1=798082&r2=798083&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/pom.xml (original)
+++ camel/branches/camel-1.x/components/camel-cxf/pom.xml Mon Jul 27 09:30:16 2009
@@ -158,7 +158,14 @@
<version>${cxf-version}</version>
<scope>test</scope>
</dependency>
-
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-bindings-jbi</artifactId>
+ <version>${cxf-version}</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
Copied: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java (from r798052, camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java?p2=camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java&p1=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java&r1=798052&r2=798083&rev=798083&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java (original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelJBIClientProxyTest.java Mon Jul 27 09:30:16 2009
@@ -16,20 +16,17 @@
*/
package org.apache.camel.component.cxf.transport;
+import junit.framework.TestCase;
import org.apache.camel.component.cxf.HelloService;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-public class CamelJBIClientProxyTest {
+public class CamelJBIClientProxyTest extends TestCase {
private HelloService proxy;
private ClassPathXmlApplicationContext applicationContext;
- @Before
+
public void setUp() {
// setup service
applicationContext = new ClassPathXmlApplicationContext(new String[]{"/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml"});
@@ -38,13 +35,11 @@
assertNotNull("The proxy should not be null.", proxy);
}
- @Test
- public void echoMethodTest() {
+ public void testEchoMethod() {
String response = proxy.echo("Hello World!");
assertEquals("Get a wrong response ", "echo Hello World!", response);
}
- @After
public void tearDown() {
if (applicationContext != null) {
applicationContext.stop();
Copied: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java (from r798052, camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java?p2=camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java&p1=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java&r1=798052&r2=798083&rev=798083&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java (original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java Mon Jul 27 09:30:16 2009
@@ -21,20 +21,21 @@
import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.converter.IOConverter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
public class JbiServiceProcessor implements Processor {
+ private static final transient Log LOG = LogFactory.getLog(JbiServiceProcessor.class);
+
private static final String ECHO_RESPONSE = "<jbi:message xmlns:jbi=\"http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper\""
+ " xmlns:msg=\"http://cxf.component.camel.apache.org\" type=\"msg:echoResponse\"><jbi:part>"
+ "<ns1:return xmlns:ns1=\"http://cxf.component.camel.apache.org\">echo Hello World!</ns1:return>"
+ "</jbi:part></jbi:message>";
- /*private static final String ECHO_BOOLEAN_RESPONSE = "<ns1:echoBooleanResponse xmlns:ns1=\"http://cxf.component.camel.apache.org/\">"
- + "<return xmlns=\"http://cxf.component.camel.apache.org/\">true</return>"
- + "</ns1:echoBooleanResponse>";*/
+
public void process(Exchange exchange) throws Exception {
Message in = exchange.getIn();
- System.out.println("print out the request " + in.getBody(String.class));
- System.out.println("The message exchange pattern is " + exchange.getPattern());
+ LOG.info("Get the request " + in.getBody(String.class));
exchange.getOut().setBody(ECHO_RESPONSE);
Copied: camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml (from r798052, camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml?p2=camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml&p1=camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml&r1=798052&r2=798083&rev=798083&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml (original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/transport/CamelJBIClientProxy.xml Mon Jul 27 09:30:16 2009
@@ -23,9 +23,9 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://cxf.apache.org/transports/camel http://cxf.apache.org/transports/camel.xsd
- http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/cxfEndpoint.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ http://activemq.apache.org/camel/schema/spring
+ http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
@@ -33,7 +33,7 @@
<import resource="classpath:META-INF/cxf/cxf-extension-camel.xml"/>
- <camelContext id="conduit_context" xmlns="http://camel.apache.org/schema/spring">
+ <camelContext id="conduit_context" xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="direct://start" />
<process ref="myProcessor" />