camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1153324 - in /camel/trunk/components/camel-cxf/src/test: java/org/apache/camel/component/cxf/wsdl/OrderTest.java resources/org/apache/camel/component/cxf/wsdl/camel-cxf.xml resources/org/apache/camel/component/cxf/wsdl/camel-route.xml
Date Wed, 03 Aug 2011 03:01:54 GMT
Author: ningjiang
Date: Wed Aug  3 03:01:53 2011
New Revision: 1153324

URL: http://svn.apache.org/viewvc?rev=1153324&view=rev
Log:
CAMEL-4294 using the dynmaic port

Modified:
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsdl/OrderTest.java
    camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-cxf.xml
    camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-route.xml

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsdl/OrderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsdl/OrderTest.java?rev=1153324&r1=1153323&r2=1153324&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsdl/OrderTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsdl/OrderTest.java
Wed Aug  3 03:01:53 2011
@@ -21,12 +21,19 @@ import java.io.InputStreamReader;
 import java.io.LineNumberReader;
 
 import org.apache.camel.ExchangePattern;
+import org.apache.camel.component.cxf.CXFTestSupport;
 import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class OrderTest extends CamelSpringTestSupport {
+    @BeforeClass
+    public static void loadTestSupport() {
+        // Need to load the static class first
+        CXFTestSupport.getPort1();
+    }
 
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {
@@ -35,13 +42,13 @@ public class OrderTest extends CamelSpri
 
     @Test
     public void testCamelWsdl() throws Exception {
-        Object body = template.sendBody("seda:camelWsdl", ExchangePattern.InOut, null);
+        Object body = template.sendBody("http://localhost:" + CXFTestSupport.getPort1() +
"/camel-order/?wsdl", ExchangePattern.InOut, null);
         checkWsdl(InputStream.class.cast(body));
     }
 
     @Test
     public void testCxfWsdl() throws Exception {
-        Object body = template.sendBody("seda:cxfWsdl", ExchangePattern.InOut, null);
+        Object body = template.sendBody("http://localhost:" + CXFTestSupport.getPort1() +
"/cxf-order/?wsdl", ExchangePattern.InOut, null);
         checkWsdl(InputStream.class.cast(body));
     }
 

Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-cxf.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-cxf.xml?rev=1153324&r1=1153323&r2=1153324&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-cxf.xml
(original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-cxf.xml
Wed Aug  3 03:01:53 2011
@@ -24,12 +24,13 @@
          http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
 
 	<import resource="classpath:META-INF/cxf/cxf.xml" />
+	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
 	<!-- The camel CXF endpoint -->
-	<cxf:cxfEndpoint id="orderEndpoint" address="http://localhost:9000/camel-order/" serviceClass="org.apache.camel.component.cxf.wsdl.OrderEndpoint"
/>
+	<cxf:cxfEndpoint id="orderEndpoint" address="http://localhost:${CXFTestSupport.port1}/camel-order/"
serviceClass="org.apache.camel.component.cxf.wsdl.OrderEndpoint" />
 
 	<!-- JAX-WS endpoint of the same class -->
-	<jaxws:endpoint id="orderEndpointCXF" address="http://localhost:9000/cxf-order/" implementor="org.apache.camel.component.cxf.wsdl.OrderEndpoint"
/>
+	<jaxws:endpoint id="orderEndpointCXF" address="http://localhost:${CXFTestSupport.port1}/cxf-order/"
implementor="org.apache.camel.component.cxf.wsdl.OrderEndpoint" />
 	
 
 </beans>

Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-route.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-route.xml?rev=1153324&r1=1153323&r2=1153324&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-route.xml
(original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/wsdl/camel-route.xml
Wed Aug  3 03:01:53 2011
@@ -29,19 +29,6 @@
 			<to uri="mock:end" />
 		</route>
 
-		<!-- test route -->
-		<route>
-			<from uri="seda:camelWsdl" />
-			<to uri="http://localhost:9000/camel-order/services?wsdl" />
-			<log message="end route camelWsdl"/>
-		</route>
-		
-		<route>
-			<from uri="seda:cxfWsdl" />
-			<to uri="http://localhost:9000/cxf-order/services?wsdl" />
-			<log message="endroute cxf wsdl"/>
-		</route>
-
 	</camelContext>
 
 



Mime
View raw message