cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1242999 - in /cxf/trunk/rt: bindings/object/src/test/java/org/apache/cxf/binding/object/ databinding/aegis/ databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/ databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/ frontend/ja...
Date Sat, 11 Feb 2012 03:10:10 GMT
Author: dkulp
Date: Sat Feb 11 03:10:09 2012
New Revision: 1242999

URL: http://svn.apache.org/viewvc?rev=1242999&view=rev
Log:
Update more of the test suite to use dynamic ports

Modified:
    cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
    cxf/trunk/rt/databinding/aegis/pom.xml
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
    cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
    cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
    cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/GenericAegisTest.java
    cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/JavascriptRhinoTest.java
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AegisBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AnyBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitBareClientTestBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitWrappedClientTestBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/GreeterClientTestBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldDocLitBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldGreeterBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/MtoMBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/RPCClientTestBeans.xml
    cxf/trunk/rt/javascript/javascript-tests/src/test/resources/attributeTestBeans.xml
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
    cxf/trunk/rt/transports/jms/src/test/resources/jms_test_jndi.xml

Modified: cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
(original)
+++ cxf/trunk/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
Sat Feb 11 03:10:09 2012
@@ -35,6 +35,7 @@ import org.apache.cxf.service.model.Bind
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.ConduitInitiatorManager;
@@ -45,6 +46,8 @@ import org.junit.Test;
 public class LocalServerRegistrationTest extends AbstractCXFTest {
     private Message response;
 
+    
+    
     @Test
     public void testServer() throws Exception {
         // Enable the auto registration of a default local endpoint when we use other transports
@@ -56,7 +59,10 @@ public class LocalServerRegistrationTest
         // Create an HTTP endpoint
         ServerFactoryBean sfb = new ServerFactoryBean();
         sfb.setServiceClass(EchoImpl.class);
-        sfb.setAddress("http://localhost:9001/echo");
+        
+        sfb.setAddress("http://localhost:" 
+            + TestUtil.getPortNumber(LocalServerRegistrationTest.class) 
+            + "/echo");
         Server server = sfb.create();
 
         List<Object> content = new ArrayList<Object>();

Modified: cxf/trunk/rt/databinding/aegis/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/pom.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/pom.xml (original)
+++ cxf/trunk/rt/databinding/aegis/pom.xml Sat Feb 11 03:10:09 2012
@@ -79,6 +79,12 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-testutils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>jdom</groupId>
             <artifactId>jdom</artifactId>
             <version>${cxf.jdom.version}</version>

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
Sat Feb 11 03:10:09 2012
@@ -30,6 +30,7 @@ import org.apache.cxf.frontend.ServerFac
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.testutil.common.TestUtil;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -38,11 +39,13 @@ import org.junit.Test;
  * 
  */
 public class AegisJaxwsGetTest extends AbstractCXFTest {
+    public static final String PORT = TestUtil.getPortNumber(AegisJaxwsGetTest.class); 
+    
     
     @Before
     public void before() throws Exception {
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
-        sf.setAddress("http://localhost:9167/Echo");
+        sf.setAddress("http://localhost:" + PORT + "/Echo");
         sf.setDataBinding(new AegisDatabinding());
         sf.setServiceBean(new Echo());
         Server server = sf.create();
@@ -51,7 +54,7 @@ public class AegisJaxwsGetTest extends A
             .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
         
         ServerFactoryBean sf2 = new ServerFactoryBean();
-        sf2.setAddress("http://localhost:9167/SimpleEcho");
+        sf2.setAddress("http://localhost:" + PORT + "/SimpleEcho");
         sf2.setDataBinding(new AegisDatabinding());
         sf2.setServiceBean(new Echo());
         server = sf2.create();
@@ -70,7 +73,7 @@ public class AegisJaxwsGetTest extends A
     @Test
     public void testGetEcho() throws Exception {
         HttpClient httpClient = createClient();
-        String url = "http://localhost:9167/Echo/echo/echo/hello";
+        String url = "http://localhost:" + PORT + "/Echo/echo/echo/hello";
         HttpMethod method = null;
         method = new GetMethod(url);
         int status = httpClient.executeMethod(method);
@@ -82,7 +85,7 @@ public class AegisJaxwsGetTest extends A
     @Test
     public void testGetEchoSimple() throws Exception {
         HttpClient httpClient = createClient();
-        String url = "http://localhost:9167/SimpleEcho/simpleEcho/string/hello";
+        String url = "http://localhost:" + PORT + "/SimpleEcho/simpleEcho/string/hello";
         HttpMethod method = null;
         method = new GetMethod(url);
         int status = httpClient.executeMethod(method);

Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
(original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
Sat Feb 11 03:10:09 2012
@@ -22,10 +22,12 @@ package org.apache.cxf.xmlbeans;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
 import org.apache.cxf.xmlbeans.wsdltest.SOAPMineService;
 import org.apache.cxf.xmlbeans.wsdltest.SayHi2MessageDocument;
@@ -35,7 +37,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class XmlBeansTest extends AbstractCXFTest {
-
+    private static final String PORT = TestUtil.getPortNumber(XmlBeansTest.class);
     private static final String CONFIG1 = "org/apache/cxf/xmlbeans/cxf.xml";
     private static final String CONFIG2 = "org/apache/cxf/xmlbeans/cxf2.xml";
 
@@ -75,6 +77,10 @@ public class XmlBeansTest extends Abstra
             new SOAPMineService(wsdlURL,
                                 new QName("http://cxf.apache.org/xmlbeans/wsdltest", "SOAPMineService"));
         GreeterMine port = ss.getSoapPort();
+        ((BindingProvider)port).getRequestContext()
+            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                 "http://localhost:" + PORT + "/SoapContext/SoapPort");
+       
         
         SayHi2MessageDocument document = SayHi2MessageDocument.Factory.newInstance();
         StringListType stringListType = document.addNewSayHi2Message();

Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml Sat Feb
11 03:10:09 2012
@@ -43,7 +43,7 @@
     </bean>
 
     <jaxws:endpoint id="greeterMineEndpoint"
-                    address="http://localhost:9000/SoapContext/SoapPort"
+                    address="local://SoapContext/SoapPort"
                     implementor="org.apache.cxf.xmlbeans.GreeterMineImpl"
                     serviceName="ns:SOAPMineService"
                     xmlns:ns="http://cxf.apache.org/xmlbeans">

Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml Sat Feb
11 03:10:09 2012
@@ -23,6 +23,7 @@
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
 
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
     
     <bean id="GreeterImpl"
           class="org.apache.cxf.xmlbeans.GreeterMineImpl"
@@ -44,7 +45,7 @@
     </bean>
 
     <jaxws:endpoint id="greeterMineEndpoint"
-                    address="http://localhost:9000/SoapContext/SoapPort"
+                    address="http://localhost:${testutil.ports.XmlBeansTest}/SoapContext/SoapPort"
                     implementor="org.apache.cxf.xmlbeans.GreeterMineImpl">
         <jaxws:serviceFactory>
             <ref bean="testServiceFactory"/>

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml Sat
Feb 11 03:10:09 2012
@@ -26,7 +26,7 @@ http://cxf.apache.org/bindings/soap http
 http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
 
   <import resource="classpath:META-INF/cxf/cxf.xml"/>
-
+	
   <bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
       <property name="transportIds">
           <list>
@@ -34,6 +34,12 @@ http://cxf.apache.org/jaxrs http://cxf.a
               <value>http://cxf.apache.org/transports/http</value>
           </list>
       </property>
+      <property name="uriPrefixes">
+          <list>
+              <value>http</value>
+              <value>local</value>
+          </list>
+      </property>
   </bean>
   
   <jaxrs:server xmlns:s="http://books.com" serviceName="s:BookService" 

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/GenericAegisTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/GenericAegisTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/GenericAegisTest.java
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/GenericAegisTest.java
Sat Feb 11 03:10:09 2012
@@ -30,6 +30,8 @@ import org.apache.cxf.javascript.service
 import org.apache.cxf.javascript.types.SchemaJavascriptBuilder;
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.testutil.common.TestUtil;
+
 import org.junit.Test;
 import static org.junit.Assert.assertNotNull;
 
@@ -42,6 +44,7 @@ import static org.junit.Assert.assertNot
  * SEBs.
  */
 public class GenericAegisTest  {
+    public static final String PORT = TestUtil.getPortNumber(GenericAegisTest.class);
 
     // the claim is that code generation makes this go boom.
     @Test
@@ -53,7 +56,7 @@ public class GenericAegisTest  {
         ServerFactoryBean svrFactory = new ServerFactoryBean();
         // we sure can't get a .class for the interface, can we?
         svrFactory.setServiceClass(impl.getClass());
-        svrFactory.setAddress("http://localhost:9000/aegisgeneric");
+        svrFactory.setAddress("http://localhost:" + PORT + "/aegisgeneric");
         svrFactory.setServiceBean(impl);
         Server server = svrFactory.create();
         ServiceInfo serviceInfo = ((EndpointImpl)server.getEndpoint()).getEndpointInfo().getService();

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/JavascriptRhinoTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/JavascriptRhinoTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/JavascriptRhinoTest.java
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/JavascriptRhinoTest.java
Sat Feb 11 03:10:09 2012
@@ -28,9 +28,10 @@ import org.apache.cxf.jaxws.JaxWsProxyFa
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.test.AbstractCXFSpringTest;
+import org.apache.cxf.testutil.common.TestUtil;
 
 public abstract class JavascriptRhinoTest extends AbstractCXFSpringTest {
-    
+    public static final String PORT = TestUtil.getPortNumber("TestPort");
     protected JavascriptTestUtilities testUtilities;
     protected JaxWsProxyFactoryBean clientProxyFactory;
     protected ServiceInfo serviceInfo;

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AegisBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AegisBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AegisBeans.xml (original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AegisBeans.xml Sat Feb 11
03:10:09 2012
@@ -22,11 +22,14 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd
            http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
            http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
-
+           
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+  
 	<import resource="classpath:META-INF/cxf/cxf.xml" />
 
 	<simple:server id="aegis-service"
-		serviceClass="org.apache.cxf.javascript.fortest.AegisService" address="http://localhost:8808/aegis">
+		serviceClass="org.apache.cxf.javascript.fortest.AegisService" 
+		address="http://localhost:${testutil.ports.TestPort}/aegis">
 		<simple:serviceBean>
 			<bean class="org.apache.cxf.javascript.fortest.AegisServiceImpl" />
 		</simple:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AnyBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AnyBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AnyBeans.xml (original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/AnyBeans.xml Sat Feb 11 03:10:09
2012
@@ -27,9 +27,10 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
   <import resource="classpath:META-INF/cxf/cxf.xml" />
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
               
  <jaxws:server id="any-service-endpoint" 
-    address="http://localhost:8808/any" >
+    address="http://localhost:${testutil.ports.TestPort}/any" >
     <jaxws:serviceBean>
       <bean class='org.apache.cxf.javascript.fortest.AnyImpl'/>
     </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitBareClientTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitBareClientTestBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitBareClientTestBeans.xml
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitBareClientTestBeans.xml
Sat Feb 11 03:10:09 2012
@@ -27,9 +27,10 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
   <import resource="classpath:META-INF/cxf/cxf.xml" />
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
   
   <jaxws:server id="dlb-service-endpoint" 
-    address="http://localhost:8808/SimpleDocLitBare" >
+    address="http://localhost:${testutil.ports.TestPort}/SimpleDocLitBare" >
     <jaxws:serviceBean>
       <bean class='org.apache.cxf.javascript.fortest.SimpleDocLitBareImpl'/>
     </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitWrappedClientTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitWrappedClientTestBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitWrappedClientTestBeans.xml
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/DocLitWrappedClientTestBeans.xml
Sat Feb 11 03:10:09 2012
@@ -28,6 +28,7 @@
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
   <import resource="classpath:META-INF/cxf/cxf.xml" />
   <!-- 
       <cxf:bus>
@@ -38,7 +39,7 @@
     -->
   
   <jaxws:server id="dlw-service-endpoint" 
-    address="http://localhost:8808/SimpleDocLitWrapped" >
+    address="http://localhost:${testutil.ports.TestPort}/SimpleDocLitWrapped" >
      <jaxws:serviceBean>
       <bean class='org.apache.cxf.javascript.fortest.SimpleDocLitWrappedImpl'/>
     </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/GreeterClientTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/GreeterClientTestBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/GreeterClientTestBeans.xml
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/GreeterClientTestBeans.xml
Sat Feb 11 03:10:09 2012
@@ -27,9 +27,10 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
   <import resource="classpath:META-INF/cxf/cxf.xml" />
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
               
  <jaxws:server id="greeter-service-endpoint" 
-    address="http://localhost:8808/Greeter" >
+    address="http://localhost:${testutil.ports.TestPort}/Greeter" >
     <jaxws:serviceBean>
       <bean class='org.apache.cxf.javascript.hwdemo.GreeterImpl'/>
     </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldDocLitBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldDocLitBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldDocLitBeans.xml
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldDocLitBeans.xml
Sat Feb 11 03:10:09 2012
@@ -27,9 +27,10 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
   <import resource="classpath:META-INF/cxf/cxf.xml" />
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
   
   <jaxws:server id="hw-service-endpoint" 
-    address="http://localhost:8808/HelloWorldDocLit" >
+    address="http://localhost:${testutil.ports.TestPort}/HelloWorldDocLit" >
     <jaxws:serviceBean>
     	<bean class='org.apache.hello_world_doc_lit.GreeterImplDoc'/>
     </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldGreeterBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldGreeterBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldGreeterBeans.xml
(original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/HelloWorldGreeterBeans.xml
Sat Feb 11 03:10:09 2012
@@ -27,10 +27,11 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
 
  <import resource="classpath:META-INF/cxf/cxf.xml" />
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
 
  <jaxws:server id="hwg-service-endpoint"
-  address="http://localhost:8808/HelloWorldGreeter">
+  address="http://localhost:${testutil.ports.TestPort}/HelloWorldGreeter">
   <jaxws:serviceBean>
    <bean class='org.apache.hello_world.GreeterImpl' />
   </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/MtoMBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/MtoMBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/MtoMBeans.xml (original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/MtoMBeans.xml Sat Feb 11 03:10:09
2012
@@ -27,16 +27,17 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
   <import resource="classpath:META-INF/cxf/cxf.xml" />
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
               
  <jaxws:server id="mtom-service-endpoint" 
-    address="http://localhost:8808/mtom" >
+    address="http://localhost:${testutil.ports.TestPort}/mtom" >
     <jaxws:serviceBean>
       <bean class='org.apache.cxf.javascript.fortest.MtoMImpl'/>
     </jaxws:serviceBean>
  </jaxws:server>
  
  <jaxws:client id="mtom-client" 
- 			   address="http://localhost:8808/mtom" 
+ 			   address="http://localhost:${testutil.ports.TestPort}/mtom" 
  			   serviceClass="org.apache.cxf.javascript.fortest.MtoM">
     <jaxws:inInterceptors>
 			<bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/RPCClientTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/RPCClientTestBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/RPCClientTestBeans.xml (original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/RPCClientTestBeans.xml Sat
Feb 11 03:10:09 2012
@@ -27,11 +27,12 @@
               http://www.springframework.org/schema/beans/spring-beans.xsd">
               
   <import resource="classpath:META-INF/cxf/cxf.xml" />
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
   
   <bean id='rpc-service' class='org.apache.cxf.javascript.fortest.SimpleRPCImpl'/>
   
   <jaxws:server id="rpc-service-endpoint" 
-    address="http://localhost:8808/SimpleRPC" >
+    address="http://localhost:${testutil.ports.TestPort}/SimpleRPC" >
      <jaxws:serviceBean>
       <ref bean="rpc-service" />
     </jaxws:serviceBean>

Modified: cxf/trunk/rt/javascript/javascript-tests/src/test/resources/attributeTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/javascript-tests/src/test/resources/attributeTestBeans.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/javascript-tests/src/test/resources/attributeTestBeans.xml (original)
+++ cxf/trunk/rt/javascript/javascript-tests/src/test/resources/attributeTestBeans.xml Sat
Feb 11 03:10:09 2012
@@ -24,6 +24,7 @@ under the License.
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 						http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
 						http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">
+  	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 	<!-- CXF -->
 	<import resource="classpath:META-INF/cxf/cxf.xml" />
 

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
Sat Feb 11 03:10:09 2012
@@ -31,6 +31,7 @@ import org.apache.cxf.message.ExchangeIm
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
@@ -42,8 +43,10 @@ import org.junit.Assert;
 import org.junit.Before;
 
 public abstract class AbstractJMSTester extends Assert {
+    public static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    
     protected static final String MESSAGE_CONTENT = "HelloWorld";
-
+    
     private static JMSBrokerSetup broker;
 
     protected Bus bus;
@@ -82,6 +85,7 @@ public abstract class AbstractJMSTester 
     protected void setupServiceInfo(String ns, String wsdl, String serviceName, String portName)
{
         URL wsdlUrl = getClass().getResource(wsdl);
         assertNotNull(wsdlUrl);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, wsdlUrl.toString());
         WSDLServiceFactory factory = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
 
         Service service = factory.create();
@@ -108,6 +112,22 @@ public abstract class AbstractJMSTester 
         os.close();
     }
 
+    protected void adjustEndpointInfoURL() {
+        if (endpointInfo != null) {
+            AddressType at = endpointInfo.getExtensor(AddressType.class);
+            if (at != null) {
+                for (JMSNamingPropertyType jnt : at.getJMSNamingProperty()) {
+                    if (jnt.getName().equals("java.naming.provider.url")) {
+                        String v = jnt.getValue();
+                        v = v.replace("61500", JMS_PORT);
+                        v = v.replace("61616", JMS_PORT);
+                        jnt.setValue(v);
+                    }
+                }
+            }
+        }
+    }
+    
     protected JMSConduit setupJMSConduit(boolean send, boolean decoupled) throws IOException
{
         if (decoupled) {
             // setup the reference type
@@ -115,6 +135,8 @@ public abstract class AbstractJMSTester 
             target = EasyMock.createMock(EndpointReferenceType.class);
         }
         
+        adjustEndpointInfoURL();
+
         JMSConfiguration jmsConfig = new JMSOldConfigHolder()
             .createJMSConfigurationFromEndpointInfo(bus, endpointInfo, null, true);
         JMSConduit jmsConduit = new JMSConduit(endpointInfo, target, jmsConfig, bus);

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Sat Feb 11 03:10:09 2012
@@ -48,7 +48,7 @@ public class JMSConduitTest extends Abst
 
     @BeforeClass
     public static void createAndStartBroker() throws Exception {
-        startBroker(new JMSBrokerSetup("tcp://localhost:61500"));
+        startBroker(new JMSBrokerSetup("tcp://localhost:" + JMS_PORT));
     }
 
     @Test
@@ -154,7 +154,6 @@ public class JMSConduitTest extends Abst
     public void testJMSMessageMarshal() throws Exception {
         setupServiceInfo("http://cxf.apache.org/hello_world_jms", "/wsdl/jms_test.wsdl",
                          "HelloWorldServiceLoop", "HelloWorldPortLoop");
-
         String testMsg = "Test Message";
         JMSConduit conduit = setupJMSConduit(true, false);
         Message msg = new MessageImpl();

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
Sat Feb 11 03:10:09 2012
@@ -53,7 +53,7 @@ public class JMSDestinationTest extends 
     
     @BeforeClass
     public static void createAndStartBroker() throws Exception {
-        startBroker(new JMSBrokerSetup("tcp://localhost:61500"));
+        startBroker(new JMSBrokerSetup("tcp://localhost:" + JMS_PORT));
     }
 
     private void waitForReceiveInMessage() {
@@ -85,8 +85,11 @@ public class JMSDestinationTest extends 
     }
 
     public JMSDestination setupJMSDestination(boolean send) throws IOException {
+
+        adjustEndpointInfoURL();
         JMSConfiguration jmsConfig = new JMSOldConfigHolder()
             .createJMSConfigurationFromEndpointInfo(bus, endpointInfo, null, false);
+        
         JMSDestination jmsDestination = new JMSDestination(bus, endpointInfo, jmsConfig);
 
         if (send) {

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
Sat Feb 11 03:10:09 2012
@@ -29,7 +29,7 @@ public class OldConfigTest extends Abstr
 
     @BeforeClass
     public static void createAndStartBroker() throws Exception {
-        startBroker(new JMSBrokerSetup("tcp://localhost:61500"));
+        startBroker(new JMSBrokerSetup("tcp://localhost:" + JMS_PORT));
     }
 
     @Test

Modified: cxf/trunk/rt/transports/jms/src/test/resources/jms_test_jndi.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/resources/jms_test_jndi.xml?rev=1242999&r1=1242998&r2=1242999&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/resources/jms_test_jndi.xml (original)
+++ cxf/trunk/rt/transports/jms/src/test/resources/jms_test_jndi.xml Sat Feb 11 03:10:09 2012
@@ -30,6 +30,10 @@ http://cxf.apache.org/transports/jms htt
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
     
+    
+    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
+        p:brokerURL="vm://localhost"/>
+    
     <bean id="jndi" class="org.apache.xbean.spring.jndi.SpringInitialContextFactory" factory-method="makeInitialContext"
singleton="true">
         <property name="entries" ref="jndiEntries" />
     </bean>
@@ -37,13 +41,7 @@ http://www.springframework.org/schema/be
     <util:map id="jndiEntries">
         <entry key="ConnectionFactory">
             <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-                <property name="targetConnectionFactory">
-                    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                        <property name="brokerURL">
-                            <value>tcp://localhost:61500</value>
-                        </property>
-                    </bean>
-                </property>
+                <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
             </bean>
         </entry>
     </util:map>



Mime
View raw message