Return-Path: Delivered-To: apmail-activemq-camel-commits-archive@locus.apache.org Received: (qmail 57617 invoked from network); 12 Nov 2008 07:29:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2008 07:29:51 -0000 Received: (qmail 98253 invoked by uid 500); 12 Nov 2008 07:29:59 -0000 Delivered-To: apmail-activemq-camel-commits-archive@activemq.apache.org Received: (qmail 98236 invoked by uid 500); 12 Nov 2008 07:29:59 -0000 Mailing-List: contact camel-commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-commits@activemq.apache.org Received: (qmail 98227 invoked by uid 99); 12 Nov 2008 07:29:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 23:29:59 -0800 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2008 07:28:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C2FEF238895F; Tue, 11 Nov 2008 23:28:49 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r713288 - in /activemq/camel/branches/camel-1.x: ./ components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ Date: Wed, 12 Nov 2008 07:28:49 -0000 To: camel-commits@activemq.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081112072849.C2FEF238895F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Tue Nov 11 23:28:48 2008 New Revision: 713288 URL: http://svn.apache.org/viewvc?rev=713288&view=rev Log: Merged revisions 713273 via svnmerge from https://svn.apache.org/repos/asf/activemq/camel/trunk ........ r713273 | ningjiang | 2008-11-12 14:42:32 +0800 (Wed, 12 Nov 2008) | 1 line Clean up the CXF Greeter unit tests ........ Added: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTestSupport.java - copied unchanged from r713273, activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTestSupport.java activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java - copied unchanged from r713273, activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java Removed: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTest.java Modified: activemq/camel/branches/camel-1.x/ (props changed) activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java Propchange: activemq/camel/branches/camel-1.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Nov 11 23:28:48 2008 @@ -1 +1 @@ -/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107 +/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713273 Propchange: activemq/camel/branches/camel-1.x/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Nov 11 23:28:48 2008 @@ -1 +1 @@ -/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712712,712925,713013,713107 +/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712712,712925,713013,713107,713273 Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff ============================================================================== --- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java (original) +++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java Tue Nov 11 23:28:48 2008 @@ -22,25 +22,50 @@ import javax.xml.ws.Endpoint; import javax.xml.ws.Service; +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + import org.apache.camel.CamelContext; +import org.apache.camel.spring.SpringCamelContext; import org.apache.camel.spring.processor.SpringTestHelper; +import org.apache.cxf.jaxws.EndpointImpl; import org.apache.hello_world_soap_http.Greeter; import org.apache.hello_world_soap_http.GreeterImpl; import org.apache.hello_world_soap_http.NoSuchCodeLitFault; -public class CXFGreeterRouterTest extends CxfSpringRouterTest { +public class CXFGreeterRouterTest extends CxfRouterTestSupport { + protected AbstractXmlApplicationContext applicationContext; + private final QName serviceName = new QName("http://apache.org/hello_world_soap_http", "SOAPService"); private final QName routerPortName = new QName("http://apache.org/hello_world_soap_http", "RouterPort"); + + @Override + protected void setUp() throws Exception { + applicationContext = createApplicationContext(); + super.setUp(); + assertNotNull("Should have created a valid spring context", applicationContext); + + + } + + @Override + protected void tearDown() throws Exception { + if (applicationContext != null) { + applicationContext.destroy(); + } + super.tearDown(); + } @Override protected void startService() { Object implementor = new GreeterImpl(); String address = "http://localhost:9000/SoapContext/SoapPort"; - Endpoint.publish(address, implementor); + EndpointImpl endpoint = (EndpointImpl)Endpoint.publish(address, implementor); + server = endpoint.getServer(); } - @Override + public void testInvokingServiceFromCXFClient() throws Exception { Service service = Service.create(serviceName); service.addPort(routerPortName, "http://schemas.xmlsoap.org/soap/", @@ -67,20 +92,17 @@ } } - + @Override - public void testOnwayInvocation() throws Exception { - Service service = Service.create(serviceName); - service.addPort(routerPortName, "http://schemas.xmlsoap.org/soap/", - "http://localhost:9003/CamelContext/RouterPort"); - Greeter greeter = service.getPort(routerPortName, Greeter.class); - greeter.greetMeOneWay("call greetMe OneWay !"); + protected CamelContext createCamelContext() throws Exception { + return SpringCamelContext.springCamelContext(applicationContext); } - @Override - protected CamelContext createCamelContext() throws Exception { - return SpringTestHelper.createSpringCamelContext(this, "org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml"); + + protected ClassPathXmlApplicationContext createApplicationContext() { + return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointsRouterContext.xml"); } + } Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff ============================================================================== --- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java (original) +++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java Tue Nov 11 23:28:48 2008 @@ -34,12 +34,7 @@ } }; } - - @Override - protected CamelContext createCamelContext() throws Exception { - return SpringCamelContext.springCamelContext(applicationContext); - } - + @Override protected ClassPathXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointBeans.xml"); Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff ============================================================================== --- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java (original) +++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java Tue Nov 11 23:28:48 2008 @@ -35,11 +35,7 @@ }; } - @Override - protected CamelContext createCamelContext() throws Exception { - return SpringCamelContext.springCamelContext(applicationContext); - } - + @Override protected ClassPathXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointBeans.xml"); Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff ============================================================================== --- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java (original) +++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadMessageRouterTest.java Tue Nov 11 23:28:48 2008 @@ -18,7 +18,7 @@ import org.apache.camel.builder.RouteBuilder; -public class CxfPayLoadMessageRouterTest extends CxfRouterTest { +public class CxfPayLoadMessageRouterTest extends CxfSimpleRouterTest { private String routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=PAYLOAD"; private String serviceEndpointURI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=PAYLOAD"; protected RouteBuilder createRouteBuilder() { Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff ============================================================================== --- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java (original) +++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java Tue Nov 11 23:28:48 2008 @@ -18,7 +18,7 @@ import org.apache.camel.builder.RouteBuilder; -public class CxfRawMessageRouterTest extends CxfRouterTest { +public class CxfRawMessageRouterTest extends CxfSimpleRouterTest { private String routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=MESSAGE"; private String serviceEndpointURI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=MESSAGE"; protected RouteBuilder createRouteBuilder() { Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java?rev=713288&r1=713287&r2=713288&view=diff ============================================================================== --- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java (original) +++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java Tue Nov 11 23:28:48 2008 @@ -23,7 +23,7 @@ import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -public class CxfSpringRouterTest extends CxfRouterTest { +public class CxfSpringRouterTest extends CxfSimpleRouterTest { protected AbstractXmlApplicationContext applicationContext; @Override