You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/06/07 23:08:09 UTC

svn commit: r952435 - in /cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest: http/ http/resources/ http_jetty/ http_jetty/continuations/ servlet/

Author: dkulp
Date: Mon Jun  7 21:08:08 2010
New Revision: 952435

URL: http://svn.apache.org/viewvc?rev=952435&view=rev
Log:
Update all the transport systest to use dynamic ports

Modified:
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Http2HttpLoopRedirectFail.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Poltim.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Rethwel.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-publish.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/pkcs12.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/Server.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/ThreadPoolTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java Mon Jun  7 21:08:08 2010
@@ -26,13 +26,13 @@ import org.apache.cxf.bus.spring.SpringB
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class BareServer extends AbstractBusTestServerBase {
-
+    public static final String PORT = allocatePort(BareServer.class); 
     @Override
     protected void run() {
         Bus bus = new SpringBusFactory().createBus();
         SpringBusFactory.setDefaultBus(bus);
         Object implementor = new GreeterImpl();
-        String address = "http://localhost:9020/SoapContext/GreeterPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
         Endpoint.publish(address, implementor);
         
     }

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java Mon Jun  7 21:08:08 2010
@@ -28,7 +28,16 @@ import org.apache.cxf.testutil.common.Ab
  * Everything else is designed to be spring-loaded.
  */
 public class BusServer extends AbstractBusTestServerBase {
-
+    public static final String PORT0 = allocatePort(BusServer.class, 0);
+    public static final String PORT1 = allocatePort(BusServer.class, 1);
+    public static final String PORT2 = allocatePort(BusServer.class, 2);
+    public static final String PORT3 = allocatePort(BusServer.class, 3);
+    public static final String PORT4 = allocatePort(BusServer.class, 4);
+    public static final String PORT5 = allocatePort(BusServer.class, 5);
+    public static final String PORT6 = allocatePort(BusServer.class, 6);
+    public static final String PORT7 = allocatePort(BusServer.class, 7);
+    public static final String PORT8 = allocatePort(BusServer.class, 8);
+    
     protected void run()  {
         //
         // Just instantiate the Bus; services will be instantiated

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java Mon Jun  7 21:08:08 2010
@@ -36,7 +36,15 @@ import org.junit.Test;
  * constraints logic.
  */
 public class CertConstraintsTest extends AbstractBusClientServerTestBase {
-    
+    public static final String PORT0 = BusServer.PORT0;
+    public static final String PORT1 = BusServer.PORT1;
+    public static final String PORT2 = BusServer.PORT2;
+    public static final String PORT3 = BusServer.PORT3;
+    public static final String PORT4 = BusServer.PORT4;
+    public static final String PORT5 = BusServer.PORT5;
+    public static final String PORT6 = BusServer.PORT6;
+    public static final String PORT7 = BusServer.PORT7;
+    public static final String PORT8 = BusServer.PORT8;
     //
     // data
     //
@@ -122,35 +130,35 @@ public class CertConstraintsTest extends
         //
         // Good Subject DN
         //
-        testSuccessfulCall("https://localhost:9006/SoapContext/HttpsPort");
+        testSuccessfulCall("https://localhost:" + PORT0 + "/SoapContext/HttpsPort");
         //
         // Bad Subject DN
         //
-        testFailedCall("https://localhost:9007/SoapContext/HttpsPort");
+        testFailedCall("https://localhost:" + PORT1 + "/SoapContext/HttpsPort");
         //
         // Mixed Subject DN (ALL)
         //
-        testFailedCall("https://localhost:9008/SoapContext/HttpsPort");
+        testFailedCall("https://localhost:" + PORT2 + "/SoapContext/HttpsPort");
         //
         // Mixed Subject DN (ANY)
         //
-        testSuccessfulCall("https://localhost:9009/SoapContext/HttpsPort");
+        testSuccessfulCall("https://localhost:" + PORT3 + "/SoapContext/HttpsPort");
         //
         // Mixed Issuer DN (ALL)
         //
-        testFailedCall("https://localhost:9010/SoapContext/HttpsPort");
+        testFailedCall("https://localhost:" + PORT4 + "/SoapContext/HttpsPort");
         //
         // Mixed Issuer DN (ANY)
         //
-        testSuccessfulCall("https://localhost:9011/SoapContext/HttpsPort");
+        testSuccessfulCall("https://localhost:" + PORT5 + "/SoapContext/HttpsPort");
         //
         // Bad server Subject DN
         //
-        testFailedCall("https://localhost:9012/SoapContext/HttpsPort");
+        testFailedCall("https://localhost:" + PORT6 + "/SoapContext/HttpsPort");
         //
         // Bad server Issuer DN
         //
-        testFailedCall("https://localhost:9013/SoapContext/HttpsPort");
+        testFailedCall("https://localhost:" + PORT7 + "/SoapContext/HttpsPort");
         
         stopServers();
     }

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java Mon Jun  7 21:08:08 2010
@@ -38,6 +38,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 
 public class ClientServerSessionTest extends AbstractBusClientServerTestBase {
+    public static final String PORT = SessionServer.PORT;
     @BeforeClass
     public static void startServers() throws Exception {
         
@@ -57,6 +58,7 @@ public class ClientServerSessionTest ext
             Greeter greeter = service.getGreeterPort();
             
             BindingProvider bp = (BindingProvider)greeter;
+            updateAddressPort(bp, PORT);
             bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
             
             
@@ -118,6 +120,7 @@ public class ClientServerSessionTest ext
 
         try {
             Greeter greeter = service.getGreeterPort();
+            updateAddressPort(greeter, PORT);
 
             String greeting = greeter.greetMe("Bonjour");
             
@@ -145,7 +148,7 @@ public class ClientServerSessionTest ext
         boolean isWindows = System.getProperty("os.name").startsWith("Windows");
         
         GreeterSessionImpl implementor = new GreeterSessionImpl();
-        String address = "http://localhost:9020/SoapContext/GreeterPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
         try {
             Endpoint.publish(address, implementor);
             if (!isWindows) {

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java Mon Jun  7 21:08:08 2010
@@ -102,6 +102,15 @@ import org.springframework.context.Appli
  * the Hostname Verifier.
  */
 public class HTTPConduitTest extends AbstractBusClientServerTestBase {
+    public static final String PORT0 = BusServer.PORT0;
+    public static final String PORT1 = BusServer.PORT1;
+    public static final String PORT2 = BusServer.PORT2;
+    public static final String PORT3 = BusServer.PORT3;
+    public static final String PORT4 = BusServer.PORT4;
+    public static final String PORT5 = BusServer.PORT5;
+    public static final String PORT6 = BusServer.PORT6;
+    public static final String PORT7 = BusServer.PORT7;
+    public static final String PORT8 = BusServer.PORT8;
 
     private static final boolean IN_PROCESS = true;
     
@@ -110,15 +119,15 @@ public class HTTPConduitTest extends Abs
     private static List<String> servers = new ArrayList<String>();
 
     static {
-        addrMap.put("Mortimer", "http://localhost:9000/");
-        addrMap.put("Tarpin",   "https://localhost:9003/");
-        addrMap.put("Rethwel",  "http://localhost:9004/");
-        addrMap.put("Poltim",   "https://localhost:9005/");
-        addrMap.put("Gordy",    "https://localhost:9001/");
-        addrMap.put("Bethal",   "https://localhost:9002/");
-        addrMap.put("Abost",    "http://localhost:9007/");
-        addrMap.put("Hurlon",   "http://localhost:9006/");
-        addrMap.put("Morpit",   "https://localhost:9008/");
+        addrMap.put("Mortimer", "http://localhost:" + PORT0 + "/");
+        addrMap.put("Tarpin",   "https://localhost:" + PORT3 + "/");
+        addrMap.put("Rethwel",  "http://localhost:" + PORT4 + "/");
+        addrMap.put("Poltim",   "https://localhost:" + PORT5 + "/");
+        addrMap.put("Gordy",    "https://localhost:" + PORT1 + "/");
+        addrMap.put("Bethal",   "https://localhost:" + PORT2 + "/");
+        addrMap.put("Abost",    "http://localhost:" + PORT7 + "/");
+        addrMap.put("Hurlon",   "http://localhost:" + PORT6 + "/");
+        addrMap.put("Morpit",   "https://localhost:" + PORT8 + "/");
         tlsClientParameters.setDisableCNCheck(true);
     }
     
@@ -270,7 +279,8 @@ public class HTTPConduitTest extends Abs
 
         Greeter mortimer = service.getPort(mortimerQ, Greeter.class);
         assertNotNull("Port is null", mortimer);
-        
+        updateAddressPort(mortimer, PORT0);
+
         String answer = mortimer.sayHi();
         assertTrue("Unexpected answer: " + answer, 
                 "Bonjour from Mortimer".equals(answer));
@@ -299,7 +309,8 @@ public class HTTPConduitTest extends Abs
 
         Greeter rethwel = service.getPort(rethwelQ, Greeter.class);
         assertNotNull("Port is null", rethwel);
-        
+        updateAddressPort(rethwel, PORT5);
+
         String answer = null;
         try {
             answer = rethwel.sayHi();
@@ -346,6 +357,7 @@ public class HTTPConduitTest extends Abs
         assertNotNull("Service is null", service);
 
         Greeter rethwel = service.getPort(rethwelQ, Greeter.class);
+        updateAddressPort(rethwel, PORT4);
         assertNotNull("Port is null", rethwel);
         
         String answer = rethwel.sayHi();
@@ -379,6 +391,7 @@ public class HTTPConduitTest extends Abs
 
         Greeter hurlon = service.getPort(hurlonQ, Greeter.class);
         assertNotNull("Port is null", hurlon);
+        updateAddressPort(hurlon, PORT6);
         
         String answer = null;
         try {
@@ -413,6 +426,7 @@ public class HTTPConduitTest extends Abs
 
         Greeter bethal = service.getPort(bethalQ, Greeter.class);
         assertNotNull("Port is null", bethal);
+        updateAddressPort(bethal, PORT2);
         verifyBethalClient(bethal);        
     }
     
@@ -428,6 +442,7 @@ public class HTTPConduitTest extends Abs
         
         ApplicationContext context = bus.getExtension(BusApplicationContext.class);
         Greeter bethal = (Greeter)context.getBean("Bethal");        
+        updateAddressPort(bethal, PORT2);
         // verify the client side's setting
         verifyBethalClient(bethal);         
     }
@@ -477,6 +492,7 @@ public class HTTPConduitTest extends Abs
 
         Greeter bethal = service.getPort(bethalQ, Greeter.class);
         assertNotNull("Port is null", bethal);
+        updateAddressPort(bethal, PORT2);
         
         // Okay, I'm sick of configuration files.
         // This also tests dynamic configuration of the conduit.
@@ -517,7 +533,8 @@ public class HTTPConduitTest extends Abs
 
         Greeter poltim = service.getPort(poltimQ, Greeter.class);
         assertNotNull("Port is null", poltim);
-        
+        updateAddressPort(poltim, PORT5);
+
         // Okay, I'm sick of configuration files.
         // This also tests dynamic configuration of the conduit.
         Client client = ClientProxy.getClient(poltim);
@@ -601,6 +618,7 @@ public class HTTPConduitTest extends Abs
 
         Greeter bethal = service.getPort(bethalQ, Greeter.class);
         assertNotNull("Port is null", bethal);
+        updateAddressPort(bethal, PORT2);
         
         // Okay, I'm sick of configuration files.
         // This also tests dynamic configuration of the conduit.
@@ -657,6 +675,7 @@ public class HTTPConduitTest extends Abs
 
         Greeter tarpin = service.getPort(tarpinQ, Greeter.class);
         assertNotNull("Port is null", tarpin);
+        updateAddressPort(tarpin, PORT3);
         
         // Okay, I'm sick of configuration files.
         // This also tests dynamic configuration of the conduit.
@@ -804,6 +823,7 @@ public class HTTPConduitTest extends Abs
 
         Greeter gordy = service.getPort(gordyQ, Greeter.class);
         assertNotNull("Port is null", gordy);
+        updateAddressPort(gordy, PORT1);
         
         // Okay, I'm sick of configuration files.
         // This also tests dynamic configuration of the conduit.

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java Mon Jun  7 21:08:08 2010
@@ -36,7 +36,12 @@ import org.junit.Test;
  * HTTP/S service.
  */
 public class HTTPSClientTest extends AbstractBusClientServerTestBase {
-    
+    public static final String PORT1 = BusServer.PORT1;
+    public static final String PORT2 = BusServer.PORT2;
+    public static final String PORT3 = BusServer.PORT3;
+    public static final String PORT4 = BusServer.PORT4;
+    public static final String PORT5 = BusServer.PORT5;
+    public static final String PORT6 = BusServer.PORT6;
     //
     // data
     //
@@ -106,34 +111,34 @@ public class HTTPSClientTest extends Abs
     @Test
     public final void testJaxwsServer() throws Exception {
         testSuccessfulCall("resources/jaxws-server.xml", 
-                           "https://localhost:9002/SoapContext/HttpsPort");        
+                           "https://localhost:" + PORT2 + "/SoapContext/HttpsPort");        
     }
     @Test
     public final void testJaxwsServerChangeHttpsToHttp() throws Exception {
         testSuccessfulCall("resources/jaxws-server.xml", 
-                            "http://localhost:9003/SoapContext/HttpPort");    
+                            "http://localhost:" + PORT3 + "/SoapContext/HttpPort");    
     }    
     @Test
     public final void testJaxwsEndpoint() throws Exception {
         testSuccessfulCall("resources/jaxws-publish.xml",
-                           "https://localhost:9001/SoapContext/HttpsPort");
+                           "https://localhost:" + PORT1 + "/SoapContext/HttpsPort");
     }
     
     @Test
     public final void testPKCS12Endpoint() throws Exception {
         testSuccessfulCall("resources/pkcs12.xml",
-                           "https://localhost:9006/SoapContext/HttpsPort");
+                           "https://localhost:" + PORT6 + "/SoapContext/HttpsPort");
     }
     
     @Test
     public final void testResourceKeySpecEndpoint() throws Exception {
         testSuccessfulCall("resources/resource-key-spec.xml",
-                           "https://localhost:9004/SoapContext/HttpsPort");
+                           "https://localhost:" + PORT4 + "/SoapContext/HttpsPort");
     }
     @Test
     public final void testResourceKeySpecEndpointURL() throws Exception {
         testSuccessfulCall("resources/resource-key-spec-url.xml",
-                           "https://localhost:9005/SoapContext/HttpsPort",
-                           new URL("https://localhost:9005/SoapContext/HttpsPort?wsdl"));
+                           "https://localhost:" + PORT5 + "/SoapContext/HttpsPort",
+                           new URL("https://localhost:" + PORT5 + "/SoapContext/HttpsPort?wsdl"));
     }
 }

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java Mon Jun  7 21:08:08 2010
@@ -35,12 +35,14 @@ import junit.framework.Assert;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.hello_world_soap_http.Greeter;
 import org.junit.Test;
 
 
 public class PublishedEndpointUrlTest extends Assert {
-    
+    public static final String PORT = TestUtil.getPortNumber(PublishedEndpointUrlTest.class);
+
     @Test
     public void testPublishedEndpointUrl() throws Exception {
         
@@ -49,7 +51,7 @@ public class PublishedEndpointUrlTest ex
         
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
         svrFactory.setServiceClass(Greeter.class);
-        svrFactory.setAddress("http://localhost:9000/publishedEndpointUrl");
+        svrFactory.setAddress("http://localhost:" + PORT + "/publishedEndpointUrl");
         svrFactory.setPublishedEndpointUrl(publishedEndpointUrl);
         svrFactory.setServiceBean(implementor);
         

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java Mon Jun  7 21:08:08 2010
@@ -28,6 +28,7 @@ import org.apache.cxf.jaxws.EndpointImpl
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
 
     private String name;
     private String address;

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java Mon Jun  7 21:08:08 2010
@@ -28,6 +28,7 @@ import org.apache.cxf.bus.spring.SpringB
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class SessionServer extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(SessionServer.class);
 
     @Override
     protected void run() {
@@ -43,7 +44,7 @@ public class SessionServer extends Abstr
         Bus bus = new SpringBusFactory().createBus(configure, true);
         SpringBusFactory.setDefaultBus(bus);
         implementor = new GreeterSessionImpl();
-        address = "http://localhost:9020/SoapContext/GreeterPort";
+        address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
         Endpoint.publish(address, implementor);
         
     }

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java Mon Jun  7 21:08:08 2010
@@ -34,7 +34,7 @@ import org.apache.cxf.testutil.common.Ab
 import org.junit.Test;
 
 public class WSDLAddressRewriteTest extends AbstractBusClientServerTestBase {
-
+    public static final String PORT = allocatePort(WSDLAddressRewriteTest.class);
     @Test
     public void testWithSameAddress() throws Exception {
         Endpoint endpoint = null;
@@ -84,7 +84,7 @@ public class WSDLAddressRewriteTest exte
     }
 
     private String getSoapAddressLine(String address) throws Exception {
-        Socket s = new Socket(address, 9020);
+        Socket s = new Socket(address, Integer.parseInt(PORT));
         OutputStream os = s.getOutputStream();
         os.write("GET /SoapContext/GreeterPort?wsdl HTTP/1.1\r\n".getBytes());
         os.write(("Host:" + address + "\r\n\r\n").getBytes());
@@ -105,7 +105,7 @@ public class WSDLAddressRewriteTest exte
     }
 
     private Endpoint publishEndpoint(boolean autoRewriteSoapAddress) {
-        Endpoint endpoint = Endpoint.publish("http://localhost:9020/SoapContext/GreeterPort",
+        Endpoint endpoint = Endpoint.publish("http://localhost:" + PORT + "/SoapContext/GreeterPort",
                                              new GreeterImpl());
         EndpointInfo ei = ((EndpointImpl)endpoint).getServer().getEndpoint().getEndpointInfo();
         ei.setProperty("autoRewriteSoapAddress", autoRewriteSoapAddress);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class WSDLQueryTest extends AbstractBusClientServerTestBase {
+    public static final String PORT = BareServer.PORT;
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly",
@@ -43,7 +44,7 @@ public class WSDLQueryTest extends Abstr
 
     @Test
     public void testCorrectHostHeader() throws Exception {
-        sendQuery("localhost:9020", "HTTP/1.1 200 OK");
+        sendQuery("localhost:" + PORT, "HTTP/1.1 200 OK");
     }
 
     @Test
@@ -53,7 +54,7 @@ public class WSDLQueryTest extends Abstr
 
     @Test
     public void testBogusHostHeader() throws Exception {
-        sendQuery("foobar:9020", "HTTP/1.1 200 OK");
+        sendQuery("foobar:" + PORT, "HTTP/1.1 200 OK");
     }
 
     @Test
@@ -68,7 +69,7 @@ public class WSDLQueryTest extends Abstr
 
     private void sendQuery(String hostHeader, String expectedResponseLine)
         throws Exception {
-        Socket s = new Socket("localhost", 9020);
+        Socket s = new Socket("localhost", Integer.parseInt(PORT));
         OutputStream os = s.getOutputStream();
         os.write("GET /SoapContext/GreeterPort?wsdl HTTP/1.1\r\n".getBytes());
         os.write(("Host:" + hostHeader + "\r\n\r\n").getBytes());

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf Mon Jun  7 21:08:08 2010
@@ -38,9 +38,10 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination name="{http://apache.org/hello_world}Abost.http-destination">
-    <http:server RedirectURL="http://localhost:9006/Hurlon"/>
+    <http:server RedirectURL="http://localhost:${testutil.ports.BusServer.6}/Hurlon"/>
   </http:destination>
 
 </beans>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf Mon Jun  7 21:08:08 2010
@@ -39,13 +39,14 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination 
     name="{http://apache.org/hello_world}Bethal.http-destination">
   </http:destination>
   
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9002">
+	 <httpj:engine port="${testutil.ports.BusServer.2}">
 	     <httpj:tlsServerParameters>
 	      <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml Mon Jun  7 21:08:08 2010
@@ -33,6 +33,7 @@
            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">
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
 
 	<import resource="classpath:org/apache/cxf/systest/http/resources/BethalClientConfig.cxf" />
@@ -42,6 +43,6 @@
     serviceName="s:SOAPService"
     endpointName="s:Bethal"
     xmlns:s="http://apache.org/hello_world"
-    address="https://localhost:9002/Bethal"/>
+    address="https://localhost:${testutil.ports.BusServer.2}/Bethal"/>
    
 </beans>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf Mon Jun  7 21:08:08 2010
@@ -32,6 +32,7 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
    <http:conduit name="{http://apache.org/hello_world}Bethal.http-conduit">
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf Mon Jun  7 21:08:08 2010
@@ -39,14 +39,15 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination 
          name="{http://apache.org/hello_world}Gordy.http-destination">
-    <http:server RedirectURL="https://localhost:9002/Bethal"/>
+    <http:server RedirectURL="https://localhost:${testutil.ports.BusServer.2}/Bethal"/>
   </http:destination>
   
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9001">
+	 <httpj:engine port="${testutil.ports.BusServer.1}">
 	     <httpj:tlsServerParameters>
 	      <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Http2HttpLoopRedirectFail.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Http2HttpLoopRedirectFail.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Http2HttpLoopRedirectFail.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Http2HttpLoopRedirectFail.cxf Mon Jun  7 21:08:08 2010
@@ -32,6 +32,7 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
    <http:conduit name="{http://apache.org/hello_world}Hurlon.http-conduit">
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf Mon Jun  7 21:08:08 2010
@@ -39,9 +39,10 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination name="{http://apache.org/hello_world}Hurlon.http-destination">
-    <http:server RedirectURL="http://localhost:9007/Abost"/>
+    <http:server RedirectURL="http://localhost:${testutil.ports.BusServer.7}/Abost"/>
   </http:destination>
   
 </beans>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf Mon Jun  7 21:08:08 2010
@@ -39,12 +39,13 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination name="{http://apache.org/hello_world}GreeterImplPort.http-destination">
   </http:destination>
   
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9008">
+	 <httpj:engine port="${testutil.ports.BusServer.8}">
 	     <httpj:tlsServerParameters>
 	      <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Poltim.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Poltim.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Poltim.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Poltim.cxf Mon Jun  7 21:08:08 2010
@@ -40,13 +40,14 @@
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
 
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination name="{http://apache.org/hello_world}Poltim.http-destination">
-    <http:server RedirectURL="http://localhost:9000/Mortimer"/>
+    <http:server RedirectURL="http://localhost:${testutil.ports.BusServer.0}/Mortimer"/>
   </http:destination>
   
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9005">
+	 <httpj:engine port="${testutil.ports.BusServer.5}">
 	     <httpj:tlsServerParameters>
 	      <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Rethwel.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Rethwel.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Rethwel.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Rethwel.cxf Mon Jun  7 21:08:08 2010
@@ -39,10 +39,11 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination name="{http://apache.org/hello_world}Rethwel.http-destination">
 
-    <http:server RedirectURL="http://localhost:9000/Mortimer"/>
+    <http:server RedirectURL="http://localhost:${testutil.ports.BusServer.0}/Mortimer"/>
   </http:destination>
   
 </beans>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml Mon Jun  7 21:08:08 2010
@@ -32,9 +32,10 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
               
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9020">
+	 <httpj:engine port="${testutil.ports.SessionServer}">
 	     <httpj:sessionSupport>true</httpj:sessionSupport>	    
 	  </httpj:engine>
    </httpj:engine-factory>  

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml Mon Jun  7 21:08:08 2010
@@ -32,9 +32,10 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
               
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9020">
+	 <httpj:engine port="${testutil.ports.SessionServer}">
 	     <httpj:sessionSupport>true</httpj:sessionSupport>
 	     <!-- If the reuseAddress is true and running in a Windows box, 
 	     Jetty will not throw the java.net.BindException even the port is already used  -->

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf Mon Jun  7 21:08:08 2010
@@ -40,13 +40,14 @@
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
 
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <http:destination name="{http://apache.org/hello_world}Tarpin.http-destination">
-    <http:server RedirectURL="https://localhost:9001/Gordy"/>
+    <http:server RedirectURL="https://localhost:${testutil.ports.BusServer.1}/Gordy"/>
   </http:destination>
   
   <httpj:engine-factory bus="cxf">
-	 <httpj:engine port="9003">
+	 <httpj:engine port="${testutil.ports.BusServer.3}">
 	     <httpj:tlsServerParameters>
 	      <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-publish.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-publish.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-publish.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-publish.xml Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <!-- -->
     <!-- This Spring config file is designed to represent a minimal -->
@@ -48,7 +49,7 @@ under the License.
     <jaxws:endpoint 
         id="JaxwsHttpsEndpoint"
         implementor="org.apache.cxf.systest.http.GreeterImpl"
-        address="https://localhost:9001/SoapContext/HttpsPort"
+        address="https://localhost:${testutil.ports.BusServer.1}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
@@ -59,7 +60,7 @@ under the License.
     <!-- TLS Port configuration parameters for port 9001 -->
     <!-- -->
     <httpj:engine-factory id="port-9001-tls-config">
-        <httpj:engine port="9001">
+        <httpj:engine port="${testutil.ports.BusServer.1}">
             <httpj:tlsServerParameters>
                <sec:keyManagers keyPassword="password">
                <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <!-- -->
     <!-- This Spring config file is designed to represent a minimal -->
@@ -46,114 +47,114 @@ under the License.
     <!-- Spring-load an HTTPS servant -->
     <!-- -->
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9006"        
-        address="https://localhost:9006/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-0"        
+        address="https://localhost:${testutil.ports.BusServer.0}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9006-tls-config">
+        depends-on="port-testutil.ports.BusServer.0-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server>  
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9007"        
-        address="https://localhost:9007/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-1"        
+        address="https://localhost:${testutil.ports.BusServer.1}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9007-tls-config">
+        depends-on="port-testutil.ports.BusServer.1-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server> 
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9008"        
-        address="https://localhost:9008/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-2"        
+        address="https://localhost:${testutil.ports.BusServer.2}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9008-tls-config">
+        depends-on="port-testutil.ports.BusServer.2-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server>   
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9009"        
-        address="https://localhost:9009/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-3"        
+        address="https://localhost:${testutil.ports.BusServer.3}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9009-tls-config">
+        depends-on="port-testutil.ports.BusServer.3-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server>   
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9010"        
-        address="https://localhost:9010/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-4"        
+        address="https://localhost:${testutil.ports.BusServer.4}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9010-tls-config">
+        depends-on="port-testutil.ports.BusServer.4-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server>   
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9011"        
-        address="https://localhost:9011/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-5"        
+        address="https://localhost:${testutil.ports.BusServer.5}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9011-tls-config">
+        depends-on="port-testutil.ports.BusServer.5-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server>    
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9012"        
-        address="https://localhost:9012/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-6"        
+        address="https://localhost:${testutil.ports.BusServer.6}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9012-tls-config">
+        depends-on="port-testutil.ports.BusServer.6-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server> 
     
     <jaxws:server 
-        id="JaxwsHttpsEndpoint9013"        
-        address="https://localhost:9013/SoapContext/HttpsPort"
+        id="JaxwsHttpsEndpoint-testutil-ports-BusServer-7"        
+        address="https://localhost:${testutil.ports.BusServer.7}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
         xmlns:s="http://apache.org/hello_world/services"
-        depends-on="port-9013-tls-config">
+        depends-on="port-testutil.ports.BusServer.7-tls-config">
         <jaxws:serviceBean>
            <bean class="org.apache.cxf.systest.http.GreeterImpl"/>
         </jaxws:serviceBean>
     </jaxws:server>      
     
     <!-- -->
-    <!-- TLS Port configuration parameters for port 9006 -->
+    <!-- TLS Port configuration parameters for port 9000 -->
     <!-- -->
-    <httpj:engine-factory id="port-9006-tls-config">
-        <httpj:engine port="9006">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.0-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.0}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -176,8 +177,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9007 -->
     <!-- -->
-    <httpj:engine-factory id="port-9007-tls-config">
-        <httpj:engine port="9007">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.1-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.1}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -199,8 +200,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9008 -->
     <!-- -->
-    <httpj:engine-factory id="port-9008-tls-config">
-        <httpj:engine port="9008">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.2-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.2}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -223,8 +224,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9009 -->
     <!-- -->
-    <httpj:engine-factory id="port-9009-tls-config">
-        <httpj:engine port="9009">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.3-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.3}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -247,8 +248,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9010 -->
     <!-- -->
-    <httpj:engine-factory id="port-9010-tls-config">
-        <httpj:engine port="9010">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.4-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.4}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -272,8 +273,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9011 -->
     <!-- -->
-    <httpj:engine-factory id="port-9011-tls-config">
-        <httpj:engine port="9011">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.5-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.5}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -296,8 +297,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9012 -->
     <!-- -->
-    <httpj:engine-factory id="port-9012-tls-config">
-        <httpj:engine port="9012">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.6-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.6}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 
@@ -315,8 +316,8 @@ under the License.
     <!-- -->
     <!-- TLS Port configuration parameters for port 9013 -->
     <!-- -->
-    <httpj:engine-factory id="port-9013-tls-config">
-        <httpj:engine port="9013">
+    <httpj:engine-factory id="port-testutil.ports.BusServer.7-tls-config">
+        <httpj:engine port="${testutil.ports.BusServer.7}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
 	            <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server.xml Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <!-- -->
     <!-- This Spring config file is designed to represent a minimal -->
@@ -47,7 +48,7 @@ under the License.
     <!-- -->
     <jaxws:server 
         id="JaxwsHttpsEndpoint"        
-        address="https://localhost:9002/SoapContext/HttpsPort"
+        address="https://localhost:${testutil.ports.BusServer.2}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
@@ -61,7 +62,7 @@ under the License.
     <!--  Non http endpoint -->
     <jaxws:server 
         id="JaxwsHttpEndpoint"        
-        address="http://localhost:9003/SoapContext/HttpPort"
+        address="http://localhost:${testutil.ports.BusServer.3}/SoapContext/HttpPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
@@ -75,7 +76,7 @@ under the License.
     <!-- TLS Port configuration parameters for port 9002 -->
     <!-- -->
     <httpj:engine-factory id="port-9002-tls-config">
-        <httpj:engine port="9002">
+        <httpj:engine port="${testutil.ports.BusServer.2}">
             <httpj:tlsServerParameters>
                <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/pkcs12.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/pkcs12.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/pkcs12.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/pkcs12.xml Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <!-- -->
     <!-- This Spring config file is designed to represent a minimal -->
@@ -49,7 +50,7 @@ under the License.
     <!-- -->
     <jaxws:server 
         id="JaxwsHttpsEndpoint"        
-        address="https://localhost:9006/SoapContext/HttpsPort"
+        address="https://localhost:${testutil.ports.BusServer.6}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
@@ -64,7 +65,7 @@ under the License.
     <!-- TLS Port configuration parameters for port 9006 -->
     <!-- -->
     <httpj:engine-factory id="port-9006-tls-config">
-        <httpj:engine port="9006">
+        <httpj:engine port="${testutil.ports.BusServer.6}">
             <httpj:tlsServerParameters>
                 <sec:keyManagers keyPassword="password">
                     <sec:keyStore type="pkcs12" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <!-- -->
     <!-- This Spring config file is designed to represent a minimal -->
@@ -48,7 +49,7 @@ under the License.
     <jaxws:endpoint 
         id="JaxwsHttpsEndpoint"
         implementor="org.apache.cxf.systest.http.GreeterImpl"
-        address="https://localhost:9005/SoapContext/HttpsPort"
+        address="https://localhost:${testutil.ports.BusServer.5}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
@@ -61,7 +62,7 @@ under the License.
     <!-- This test exercises the resource attribute in a keyStore element -->
     <!-- -->
     <httpj:engine-factory id="port-9005-tls-config">
-        <httpj:engine port="9005">
+        <httpj:engine port="${testutil.ports.BusServer.5}">
             <httpj:tlsServerParameters>
                <sec:keyManagers keyPassword="password">
                <sec:keyStore type="JKS" password="password" 
@@ -80,7 +81,7 @@ under the License.
     <!-- -->
     <!-- This test exercises the resource attribute in a keyStore and certStore element -->
     <!-- -->
-    <http:conduit name="https://localhost:9005/SoapContext/HttpsPort">
+    <http:conduit name="https://localhost:.*/SoapContext/HttpsPort">
         <http:tlsClientParameters disableCNCheck="true">
             <sec:keyManagers keyPassword="password">
                <sec:keyStore type="pkcs12" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec.xml Mon Jun  7 21:08:08 2010
@@ -30,6 +30,7 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <!-- -->
     <!-- This Spring config file is designed to represent a minimal -->
@@ -48,7 +49,7 @@ under the License.
     <jaxws:endpoint 
         id="JaxwsHttpsEndpoint"
         implementor="org.apache.cxf.systest.http.GreeterImpl"
-        address="https://localhost:9004/SoapContext/HttpsPort"
+        address="https://localhost:${testutil.ports.BusServer.4}/SoapContext/HttpsPort"
         serviceName="s:SOAPService"
         endpointName="e:HttpsPort"
         xmlns:e="http://apache.org/hello_world/services"
@@ -61,7 +62,7 @@ under the License.
     <!-- This test exercises the resource attribute in a keyStore element -->
     <!-- -->
     <httpj:engine-factory id="port-9004-tls-config">
-        <httpj:engine port="9004">
+        <httpj:engine port="${testutil.ports.BusServer.4}">
             <httpj:tlsServerParameters>
                <sec:keyManagers keyPassword="password">
                <sec:keyStore type="JKS" password="password" 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java Mon Jun  7 21:08:08 2010
@@ -39,6 +39,7 @@ import org.apache.cxf.endpoint.ServerReg
 import org.apache.cxf.helpers.IOUtils;
 
 import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.cxf.transport.http_jetty.JettyHTTPDestination;
 import org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine;
 import org.junit.After;
@@ -60,6 +61,8 @@ import org.springframework.core.io.Resou
  * is extra jetty configuration.
  */
 public class EngineLifecycleTest extends Assert {
+    private static final String PORT1 = TestUtil.getPortNumber(EngineLifecycleTest.class, 1);
+    private static final String PORT2 = TestUtil.getPortNumber(EngineLifecycleTest.class, 2);
     private String close;
     private GenericApplicationContext applicationContext;
     
@@ -127,7 +130,7 @@ public class EngineLifecycleTest extends
     
     private void getTestHtml() throws Exception {
         HttpURLConnection httpConnection = 
-            getHttpConnection("http://localhost:8808/test.html");    
+            getHttpConnection("http://localhost:" + PORT2 + "/test.html");    
         httpConnection.connect();
         InputStream in = httpConnection.getInputStream();        
         assertNotNull(in);
@@ -187,14 +190,14 @@ public class EngineLifecycleTest extends
         getTestHtml();
         invokeService();        
         shutdownService();
-        verifyNoServer(8808);
-        verifyNoServer(8801);
+        verifyNoServer(PORT2);
+        verifyNoServer(PORT1);
     }
     
         
-    private void verifyNoServer(int port) {
+    private void verifyNoServer(String port) {
         try {
-            Socket socket = new Socket(InetAddress.getLocalHost(), port);
+            Socket socket = new Socket(InetAddress.getLocalHost(), Integer.parseInt(port));
             socket.close();
         } catch (UnknownHostException e) {
             fail("Unknown host for local address");
@@ -218,8 +221,8 @@ public class EngineLifecycleTest extends
         invokeService();    
         invokeService8801();
         shutdownService();
-        verifyNoServer(8808);
-        verifyNoServer(8801);
+        verifyNoServer(PORT2);
+        verifyNoServer(PORT1);
         
         
         setUpBus(true);
@@ -228,8 +231,8 @@ public class EngineLifecycleTest extends
         invokeService8801();
         getTestHtml();
         shutdownService();
-        verifyNoServer(8808);
-        verifyNoServer(8801);
+        verifyNoServer(PORT2);
+        verifyNoServer(PORT1);
         
 
     }

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/Server.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/Server.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/Server.java Mon Jun  7 21:08:08 2010
@@ -29,7 +29,8 @@ import org.apache.cxf.testutil.common.Ab
 
 
 public class Server extends AbstractBusTestServerBase  {
-    static final String ADDRESS = "http://localhost:9077/SoapContext/SoapPort";
+    static final String PORT = allocatePort(Server.class);
+    static final String ADDRESS = "http://localhost:" + PORT + "/SoapContext/SoapPort";
 
     protected void run()  {
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/ThreadPoolTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/ThreadPoolTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/ThreadPoolTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/ThreadPoolTest.java Mon Jun  7 21:08:08 2010
@@ -36,6 +36,7 @@ import org.junit.Test;
  */
 
 public class ThreadPoolTest extends AbstractClientServerTestBase {
+    private static final String ADDRESS = Server.ADDRESS;
     private static final QName SERVICE_NAME = 
         new QName("http://apache.org/hello_world_soap_http", "SOAPServiceAddressing");
 
@@ -53,7 +54,7 @@ public class ThreadPoolTest extends Abst
         greeter = new SOAPService(wsdl, SERVICE_NAME).getPort(Greeter.class);
         BindingProvider bp = (BindingProvider)greeter;
         bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-                                   Server.ADDRESS);
+                                   ADDRESS);
     }
 
     @Test

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java Mon Jun  7 21:08:08 2010
@@ -37,7 +37,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class ClientServerWrappedContinuationTest extends AbstractClientServerTestBase {
-
+    public static final String PORT = allocatePort(Server.class);
+    
     private static final String CLIENT_CONFIG_FILE =
         "org/apache/cxf/systest/http_jetty/continuations/cxf.xml";
     private static final String SERVER_CONFIG_FILE =
@@ -51,7 +52,7 @@ public class ClientServerWrappedContinua
             BusFactory.setDefaultBus(bus);
             
             Object implementor = new HelloImplWithWrapppedContinuation();
-            String address = "http://localhost:9092/hellocontinuation";
+            String address = "http://localhost:" + PORT + "/hellocontinuation";
             Endpoint.publish(address, implementor);
         }
 
@@ -81,7 +82,7 @@ public class ClientServerWrappedContinua
         
         QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
         
-        URL wsdlURL = new URL("http://localhost:9092/hellocontinuation?wsdl");
+        URL wsdlURL = new URL("http://localhost:" + PORT + "/hellocontinuation?wsdl");
         
         HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
         assertNotNull(service);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml Mon Jun  7 21:08:08 2010
@@ -32,15 +32,17 @@
               http://cxf.apache.org/schemas/configuration/http-jetty.xsd
            http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+              
  <httpj:engine-factory bus="cxf">
-  <httpj:engine port='8801'>
+  <httpj:engine port='${testutil.ports.EngineLifecycleTest.1}'>
    <httpj:connector>
     <bean class="org.mortbay.jetty.bio.SocketConnector">
-     <property name="port" value="8801"/>
+     <property name="port" value="${testutil.ports.EngineLifecycleTest.1}"/>
     </bean>
    </httpj:connector>
   </httpj:engine>
-  <httpj:engine port="8808">
+  <httpj:engine port="${testutil.ports.EngineLifecycleTest.2}">
    <httpj:handlers>
     <bean class="org.mortbay.jetty.webapp.WebAppContext">
       <constructor-arg value="."/>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml Mon Jun  7 21:08:08 2010
@@ -29,6 +29,7 @@
         http://cxf.apache.org/transports/http/configuration         http://cxf.apache.org/schemas/configuration/http-conf.xsd
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
  ">
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
   <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope='prototype'>
   <property name='configuration'>
@@ -47,7 +48,7 @@
 
  <jaxws:endpoint id="dummy-service-endpoint" 
     implementor="org.apache.cxf.systest.http_jetty.Dummy" 
-    address="http://localhost:8808/Dummy">
+    address="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy">
   <jaxws:serviceFactory>
    <ref bean='jaxws-and-aegis-service-factory' />
   </jaxws:serviceFactory>
@@ -55,7 +56,7 @@
 
  <jaxws:endpoint id="dummy-8801-service-endpoint"  
                  implementor="org.apache.cxf.systest.http_jetty.Dummy" 
-                 address="http://localhost:8801/Dummy">
+                 address="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy">
   <jaxws:serviceFactory>
    <ref bean='jaxws-and-aegis-service-factory' />
   </jaxws:serviceFactory>
@@ -65,14 +66,14 @@
 
  <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
   <property name="serviceClass" value="org.apache.cxf.systest.http_jetty.DummyInterface" />
-  <property name="address" value="http://localhost:8808/Dummy" />
+  <property name="address" value="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy" />
  </bean>
 
 <bean id="dummy-client-8801" class="org.apache.cxf.systest.http_jetty.DummyInterface" factory-bean="clientFactory-8801" factory-method="create" />
 
  <bean id="clientFactory-8801" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
   <property name="serviceClass" value="org.apache.cxf.systest.http_jetty.DummyInterface" />
-  <property name="address" value="http://localhost:8801/Dummy" />
+  <property name="address" value="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy" />
  </bean>
 
 </beans>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java Mon Jun  7 21:08:08 2010
@@ -36,8 +36,10 @@ import org.junit.Test;
 
 
 public class NoSpringServletClientTest extends AbstractBusClientServerTestBase {
+    private static final String PORT = NoSpringServletServer.PORT;
+    
     private final QName portName = new QName("http://apache.org/hello_world_soap_http", "SoapPort");
-    private final String serviceURL = "http://localhost:9000/soap/";
+    private final String serviceURL = "http://localhost:" + PORT + "/soap/";
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(NoSpringServletServer.class));

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java?rev=952435&r1=952434&r2=952435&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java Mon Jun  7 21:08:08 2010
@@ -31,6 +31,9 @@ import org.mortbay.jetty.servlet.Context
 import org.mortbay.jetty.servlet.ServletHolder;
 
 public class NoSpringServletServer extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(NoSpringServletServer.class);
+
+    
     Server httpServer;
     @Override
     protected void run() {
@@ -38,7 +41,7 @@ public class NoSpringServletServer exten
         String busFactory = System.getProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME);
         System.setProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME, "org.apache.cxf.bus.CXFBusFactory");
         try {
-            httpServer = new Server(9000);
+            httpServer = new Server(Integer.parseInt(PORT));
             ContextHandlerCollection contexts = new ContextHandlerCollection();
             httpServer.setHandler(contexts);