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/11 20:36:54 UTC

svn commit: r953817 - in /cxf/branches/2.2.x-fixes: ./ systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/ systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/ systests/uncategorized/src/test/java/org/apache/cxf/systes...

Author: dkulp
Date: Fri Jun 11 18:36:53 2010
New Revision: 953817

URL: http://svn.apache.org/viewvc?rev=953817&view=rev
Log:
Merged revisions 952437 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r952437 | dkulp | 2010-06-07 17:08:39 -0400 (Mon, 07 Jun 2010) | 1 line
  
  start updating some of the uncategorized sys tests to use dynamic ports
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusShutdownTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/Server.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java
    cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -38,7 +38,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class DOCBareClientServerTest extends AbstractBusClientServerTestBase {    
-
+    public static final String PORT = Server.PORT;
+    
     private final QName serviceName = new QName("http://apache.org/hello_world_doc_lit_bare",
                                                 "SOAPService");
     private final QName portName = new QName("http://apache.org/hello_world_doc_lit_bare", "SoapPort");
@@ -60,6 +61,7 @@ public class DOCBareClientServerTest ext
 
         PutLastTradedPricePortType putLastTradedPrice = service.getPort(portName,
                                                                         PutLastTradedPricePortType.class);
+        updateAddressPort(putLastTradedPrice, PORT);
         String response = putLastTradedPrice.bareNoParam();
         assertEquals("testResponse", response);
         
@@ -109,6 +111,7 @@ public class DOCBareClientServerTest ext
 
         PutLastTradedPricePortType port = service.getPort(portName,
                                                           PutLastTradedPricePortType.class);
+        updateAddressPort(port, PORT);
         String result = port.nillableParameter(null);
         assertNull(result);
     } 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/basicDOCBare/Server.java Fri Jun 11 18:36:53 2010
@@ -30,12 +30,12 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
-
+    public static final String PORT = allocatePort(Server.class);
 
     protected void run()  {
         System.setProperty("org.apache.cxf.bus.factory", "org.apache.cxf.bus.CXFBusFactory");  
         Object implementor = new PutLastTradedPriceImpl();
-        String address = "http://localhost:9107/SOAPDocLitBareService/SoapPort";      
+        String address = "http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort";      
         Endpoint ep = Endpoint.create(implementor);
         Map<String, Object> props = new HashMap<String, Object>(2);
         props.put(Endpoint.WSDL_SERVICE, new QName("http://apache.org/hello_world_doc_lit_bare", 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusShutdownTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusShutdownTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusShutdownTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/bus/BusShutdownTest.java Fri Jun 11 18:36:53 2010
@@ -29,6 +29,7 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.test.TestUtilities;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.apache.hello_world_soap_http.SOAPService;
@@ -40,6 +41,9 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class BusShutdownTest extends Assert {
+    public static final String PORT = TestUtil.getPortNumber(BusShutdownTest.class);
+
+    
     @BeforeClass
     public static void setKeepAliveProperty() {
         TestUtilities.setKeepAliveSystemProperty(false);
@@ -59,7 +63,7 @@ public class BusShutdownTest extends Ass
         URL wsdlUrl = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull("wsdl resource was not found", wsdlUrl); 
         // Since this test always fails in linux box, try to use other port
-        String serverAddr = "http://localhost:40000/greeter/port";
+        String serverAddr = "http://localhost:" + PORT + "/greeter/port";
         makeTwoWayCallOnNewBus(wsdlUrl, serverAddr);
         
         

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -22,37 +22,30 @@ package org.apache.cxf.systest.callback;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
 import javax.xml.ws.Endpoint;
+import javax.xml.ws.EndpointReference;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
 import org.apache.callback.SOAPService;
 import org.apache.callback.ServerPortType;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.cxf.wsdl.EndpointReferenceUtils;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class CallbackClientServerTest extends AbstractBusClientServerTestBase {
+    public static final String PORT = Server.PORT;
+    public static final String CB_PORT = allocatePort(CallbackClientServerTest.class);
+    
     private static final QName SERVICE_NAME 
         = new QName("http://apache.org/callback", "SOAPService");
-    private static final QName SERVICE_NAME_CALLBACK 
-        = new QName("http://apache.org/callback", "CallbackService");
 
     private static final QName PORT_NAME 
         = new QName("http://apache.org/callback", "SOAPPort");
-
-    private static final QName PORT_NAME_CALLBACK 
-        = new QName("http://apache.org/callback", "CallbackPort");
-    
-    private static final QName PORT_TYPE_CALLBACK
-        = new QName("http://apache.org/callback", "CallbackPortType");
     
     
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(Server.class));
+        assertTrue("server did not launch correctly", launchServer(Server.class, true));
     }
 
     @Test
@@ -60,28 +53,18 @@ public class CallbackClientServerTest ex
 
                     
         Object implementor = new CallbackImpl();
-        String address = "http://localhost:9005/CallbackContext/CallbackPort";
-        Endpoint.publish(address, implementor);
+        String address = "http://localhost:" + CB_PORT + "/CallbackContext/CallbackPort";
+        Endpoint ep = Endpoint.publish(address, implementor);
     
         URL wsdlURL = getClass().getResource("/wsdl/basic_callback_test.wsdl");
     
         SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
         ServerPortType port = ss.getPort(PORT_NAME, ServerPortType.class);
+        updateAddressPort(port, PORT);
    
-        EndpointReferenceType ref = null;
-        try {
-            ref = EndpointReferenceUtils.getEndpointReference(wsdlURL, 
-                                                              SERVICE_NAME_CALLBACK, 
-                                                              PORT_NAME_CALLBACK.getLocalPart());
-            EndpointReferenceUtils.setInterfaceName(ref, PORT_TYPE_CALLBACK);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        
-       
-        Source source = EndpointReferenceUtils.convertToXML(ref);
-        W3CEndpointReference  w3cEpr = new W3CEndpointReference(source);              
-        String resp = port.registerCallback(w3cEpr);
+
+        EndpointReference w3cEpr = ep.getEndpointReference();              
+        String resp = port.registerCallback((W3CEndpointReference)w3cEpr);
         assertEquals("registerCallback called", resp);
             
     }

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/Server.java Fri Jun 11 18:36:53 2010
@@ -25,10 +25,11 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
 
     protected void run() {
         Object implementor = new ServerImpl();
-        String address = "http://localhost:9007/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
         
     }

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/ServerImpl.java Fri Jun 11 18:36:53 2010
@@ -20,11 +20,10 @@
 
 package org.apache.cxf.systest.callback;
 
-import java.net.URL;
-
 import javax.annotation.Resource;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
 import org.apache.callback.CallbackPortType;
@@ -62,9 +61,8 @@ public class ServerImpl implements Serve
             EndpointReferenceType callback = VersionTransformer.convertToInternal(w3cRef);
         
             QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback, bus);
-            String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(callback);
             QName serviceName = EndpointReferenceUtils.getServiceName(callback, bus);
-
+            String address = EndpointReferenceUtils.getAddress(callback);
             
             String portString = EndpointReferenceUtils.getPortName(callback);
             
@@ -83,9 +81,8 @@ public class ServerImpl implements Serve
                 ex.printStackTrace();
             }
             
-            URL wsdlURL = new URL(wsdlLocation);            
-            Service service = Service.create(wsdlURL, serviceName);
-            
+            Service service = Service.create(null, serviceName);
+            service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
             CallbackPortType port =  (CallbackPortType)service.getPort(portName, sei);
 
             port.serverSayHi("Sean");

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -35,6 +35,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class ValidationClientServerTest extends AbstractBusClientServerTestBase {
+    public static final String PORT = ValidationServer.PORT;
 
     private final QName serviceName = new QName("http://apache.org/schema_validation",
                                                 "SchemaValidationService");
@@ -65,6 +66,8 @@ public class ValidationClientServerTest 
 
         SchemaValidation validation = service.getPort(portName, SchemaValidation.class);
 
+        updateAddressPort(validation, PORT);
+
         ComplexStruct complexStruct = new ComplexStruct();
         complexStruct.setElem1("one");
         // Don't initialize a member of the structure.  

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java Fri Jun 11 18:36:53 2010
@@ -26,6 +26,7 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class ValidationServer extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(ValidationServer.class);
 
     private String oldConfig;
 
@@ -39,7 +40,7 @@ public class ValidationServer extends Ab
 
     protected void run() {
         Object implementor = new SchemaValidationImpl();
-        String address = "http://localhost:9900/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java Fri Jun 11 18:36:53 2010
@@ -25,6 +25,7 @@ import org.apache.cxf.binding.soap.Soap1
 import org.apache.cxf.binding.soap.SoapBindingConfiguration;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.hello_world_soap_action.Greeter;
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -32,9 +33,12 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class SoapActionTest extends Assert {
+    static final String PORT1 = TestUtil.getPortNumber(SoapActionTest.class, 1);
+    static final String PORT2 = TestUtil.getPortNumber(SoapActionTest.class, 2);
+    
     static Bus bus;
-    static String add11 = "http://localhost:9036/test11";
-    static String add12 = "http://localhost:9036/test12";
+    static String add11 = "http://localhost:" + PORT1 + "/test11";
+    static String add12 = "http://localhost:" + PORT2 + "/test12";
 
 
     @BeforeClass

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java Fri Jun 11 18:36:53 2010
@@ -24,11 +24,12 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
 
 
     protected void run()  {    
         Object implementor = new GreeterImpl();
-        String address = "http://localhost:9012/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -23,6 +23,7 @@ package org.apache.cxf.systest.soap12;
 
 import java.io.InputStream;
 import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
@@ -45,6 +46,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class Soap12ClientServerTest extends AbstractBusClientServerTestBase {    
+    public static final String PORT = Server.PORT;
 
     private final QName serviceName = new QName("http://apache.org/hello_world_soap12_http",
                                                 "SOAPService");
@@ -82,7 +84,7 @@ public class Soap12ClientServerTest exte
     @Test
     public void testGetSayHi() throws Exception {
         HttpURLConnection httpConnection = 
-            getHttpConnection("http://localhost:9012/SoapContext/SoapPort/sayHi");    
+            getHttpConnection("http://localhost:" + PORT + "/SoapContext/SoapPort/sayHi");    
         httpConnection.connect();        
         
         InputStream in = httpConnection.getInputStream();        
@@ -106,7 +108,7 @@ public class Soap12ClientServerTest exte
     @Test
     public void testGetPingMe() throws Exception  {
         HttpURLConnection httpConnection = 
-            getHttpConnection("http://localhost:9012/SoapContext/SoapPort/pingMe");    
+            getHttpConnection("http://localhost:" + PORT + "/SoapContext/SoapPort/pingMe");    
         httpConnection.connect();
         
         assertEquals(500, httpConnection.getResponseCode());
@@ -147,7 +149,7 @@ public class Soap12ClientServerTest exte
     @Test
     public void testGetMethodNotExist() throws Exception  {
         HttpURLConnection httpConnection = 
-            getHttpConnection("http://localhost:9012/SoapContext/SoapPort/greetMe");
+            getHttpConnection("http://localhost:" + PORT + "/SoapContext/SoapPort/greetMe");
         httpConnection.connect();
         
         assertEquals(500, httpConnection.getResponseCode());
@@ -177,14 +179,16 @@ public class Soap12ClientServerTest exte
     }
     
 
-    private Greeter getGreeter() {
+    private Greeter getGreeter() throws NumberFormatException, MalformedURLException {
         URL wsdl = getClass().getResource("/wsdl/hello_world_soap12.wsdl");
         assertNotNull("WSDL is null", wsdl);
 
         SOAPService service = new SOAPService(wsdl, serviceName);
         assertNotNull("Service is ull ", service);
         
-        return service.getPort(portName, Greeter.class);
+        Greeter g = service.getPort(portName, Greeter.class);
+        updateAddressPort(g, PORT);
+        return g;
     }
 
 }

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -42,6 +42,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class HeaderClientServerTest extends AbstractBusClientServerTestBase {
+    public static final String PORT = Server.PORT;
 
     private final QName serviceName = new QName("http://cxf.apache.org/pizza", "PizzaService");
 
@@ -53,7 +54,7 @@ public class HeaderClientServerTest exte
     @Test
     public void testBasicConnection() throws Exception {
         Pizza port = getPort();
-
+        updateAddressPort(port, PORT);
         OrderPizzaType req = new OrderPizzaType();
         ToppingsListType t = new ToppingsListType();
         t.getTopping().add("test");
@@ -70,6 +71,7 @@ public class HeaderClientServerTest exte
     @Test
     public void testBasicConnectionNoHeader() throws Exception {
         PizzaNoHeader port = getPortNoHeader();
+        updateAddressPort(port, PORT);
 
         OrderPizzaType req = new OrderPizzaType();
         ToppingsListType t = new ToppingsListType();

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java Fri Jun 11 18:36:53 2010
@@ -24,10 +24,11 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
 
     protected void run()  {
         Object implementor = new PizzaImpl();
-        String address = "http://localhost:9013/pizza_service/services/PizzaService";
+        String address = "http://localhost:" + PORT + "/pizza_service/services/PizzaService";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java Fri Jun 11 18:36:53 2010
@@ -23,9 +23,11 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
+    
     protected void run() {
         Object implementor = new StringArrayTestImpl();
-        String address = "http://localhost:9992/SOAPServiceRPCLit/SoapPort";
+        String address = "http://localhost:" + PORT + "/SOAPServiceRPCLit/SoapPort";
         try {            
             Endpoint.publish(address, implementor);
         } catch (Exception e) {

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java Fri Jun 11 18:36:53 2010
@@ -33,6 +33,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class StringArrayTest extends AbstractBusClientServerTestBase {
+    public static final String PORT = Server.PORT;
 
     @BeforeClass
     public static void startServers() throws Exception {
@@ -63,6 +64,7 @@ public class StringArrayTest extends Abs
         getBus().getOutInterceptors().add(logOut);
         SOAPServiceRPCLit service = new SOAPServiceRPCLit();
         StringListTest port = service.getSoapPortRPCLit();
+        updateAddressPort(port, PORT);
         String[] strs = new String[]{"org", "apache", "cxf"};
         String[] res =  port.stringListTest(strs);
         assertArrayEquals(strs, res);      

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -32,7 +32,8 @@ import org.junit.Test;
  * 
  */
 public class AppleFindClientServerTest extends AbstractBusClientServerTestBase {
-
+    public static final String PORT = AppleServer.PORT;
+    
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(AppleServer.class));
@@ -45,7 +46,7 @@ public class AppleFindClientServerTest e
         QName portName = new QName("http://type_substitution.systest.cxf.apache.org/", "AppleFinderPort");
 
         Service service = Service.create(serviceName);
-        String endpointAddress = "http://localhost:9052/appleFind";
+        String endpointAddress = "http://localhost:" + PORT + "/appleFind";
 
         service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java Fri Jun 11 18:36:53 2010
@@ -27,10 +27,10 @@ import org.apache.cxf.testutil.common.Ab
  *
  */
 public class AppleServer extends AbstractBusTestServerBase {
-
+    public static final String PORT = allocatePort(AppleServer.class);
     protected void run()  {
         Object implementor = new AppleFinderImpl();
-        Endpoint.publish("http://localhost:9052/appleFind", implementor);
+        Endpoint.publish("http://localhost:" + PORT + "/appleFind", implementor);
     }
 
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java Fri Jun 11 18:36:53 2010
@@ -24,10 +24,11 @@ import javax.xml.ws.Endpoint;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
 
     protected void run()  {    
         Object implementor = new CarDealerImpl();
-        String address = "http://localhost:9070/jaxws-type_substitution/cardealer";
+        String address = "http://localhost:" + PORT + "/jaxws-type_substitution/cardealer";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java Fri Jun 11 18:36:53 2010
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.type_substitution;
 
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
 
@@ -33,6 +34,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class TypeSubClientServerTest extends AbstractBusClientServerTestBase {    
+    public static final String PORT = Server.PORT;
 
     private final QName serviceName = new QName("http://apache.org/type_substitution/",
                                                 "CarDealerService");
@@ -90,13 +92,15 @@ public class TypeSubClientServerTest ext
         }
     }
 
-    private CarDealer getCardealer() {
+    private CarDealer getCardealer() throws NumberFormatException, MalformedURLException {
         URL wsdl = getClass().getResource("/wsdl/cardealer.wsdl");
         assertNotNull("WSDL is null", wsdl);
 
         CarDealerService service = new CarDealerService(wsdl, serviceName);
         assertNotNull("Service is null ", service);
         
-        return service.getCarDealerPort();
+        CarDealer dealer = service.getCarDealerPort();
+        updateAddressPort(dealer, PORT);
+        return dealer;
     }
 }

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java Fri Jun 11 18:36:53 2010
@@ -67,7 +67,8 @@ public abstract class AbstractTypeTestCl
         return true;
     }
     
-    public static void initClient(Class clz, QName serviceName, QName portName, String wsdlPath)
+    public static void initClient(Class clz, QName serviceName, 
+                                  QName portName, String wsdlPath)
         throws Exception {
         URL wsdlLocation = clz.getResource(wsdlPath);
         assertNotNull("Could not load wsdl " + wsdlPath, wsdlLocation);

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java Fri Jun 11 18:36:53 2010
@@ -31,6 +31,8 @@ import org.apache.cxf.systest.type_test.
 import org.apache.type_test.types1.FixedArray;
 import org.apache.type_test.types2.StructWithAnyArrayLax;
 import org.apache.type_test.types2.StructWithAnyStrict;
+
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -38,8 +40,14 @@ public class SOAPDocLitClientTypeTest ex
     protected static final String WSDL_PATH = "/wsdl/type_test/type_test_doclit_soap.wsdl";
     protected static final QName SERVICE_NAME = new QName("http://apache.org/type_test/doc", "SOAPService");
     protected static final QName PORT_NAME = new QName("http://apache.org/type_test/doc", "SOAPPort");
+    static final String PORT = SOAPDocLitServerImpl.PORT;
 
 
+    @Before
+    public void updatePort() throws Exception {
+        updateAddressPort(docClient, PORT);
+    }
+    
     @BeforeClass
     public static void startServers() throws Exception {
         boolean ok = launchServer(SOAPDocLitServerImpl.class);

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java Fri Jun 11 18:36:53 2010
@@ -32,7 +32,7 @@ import org.apache.type_test.doc.TypeTest
 import org.apache.type_test.types1.FixedArray;
 
 public class SOAPDocLitServerImpl extends AbstractBusTestServerBase {
-    
+    public static final String PORT = allocatePort(SOAPDocLitServerImpl.class);
 
     public void run()  {
         SpringBusFactory sf = new SpringBusFactory();
@@ -40,7 +40,7 @@ public class SOAPDocLitServerImpl extend
         BusFactory.setDefaultBus(
             sf.createBus("org/apache/cxf/systest/type_test/databinding-schema-validation.xml"));
         Object implementor = new SOAPTypeTestImpl();
-        String address = "http://localhost:9007/SOAPService/SOAPPort/";
+        String address = "http://localhost:" + PORT + "/SOAPService/SOAPPort/";
         Endpoint.publish(address, implementor);              
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java Fri Jun 11 18:36:53 2010
@@ -28,6 +28,8 @@ import javax.xml.ws.Holder;
 import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
 import org.apache.type_test.types2.StructWithAnyArrayLax;
 import org.apache.type_test.types2.StructWithAnyStrict;
+
+import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -37,6 +39,12 @@ public class SOAPRpcLitClientTypeTest ex
     protected static final QName SERVICE_NAME = new QName("http://apache.org/type_test/rpc", "SOAPService");
 
     protected static final QName PORT_NAME = new QName("http://apache.org/type_test/rpc", "SOAPPort");
+    static final String PORT = SOAPRpcLitServerImpl.PORT;
+    
+    @Before
+    public void updatePort() throws Exception {
+        updateAddressPort(rpcClient, PORT);
+    }
 
     @BeforeClass
     public static void startServers() throws Exception {

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java Fri Jun 11 18:36:53 2010
@@ -26,10 +26,11 @@ import org.apache.cxf.testutil.common.Ab
 import org.apache.type_test.rpc.TypeTestPortType;
 
 public class SOAPRpcLitServerImpl extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(SOAPRpcLitServerImpl.class);
 
     public void run()  {
         Object implementor = new SOAPTypeTestImpl();
-        String address = "http://localhost:9006/SOAPService/SOAPPort/";
+        String address = "http://localhost:" + PORT + "/SOAPService/SOAPPort/";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java Fri Jun 11 18:36:53 2010
@@ -21,13 +21,19 @@ package org.apache.cxf.systest.type_test
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
+
+import org.junit.Before;
 import org.junit.BeforeClass;
 
 public class XMLClientTypeTest extends AbstractTypeTestClient5 {
     static final String WSDL_PATH = "/wsdl/type_test/type_test_xml.wsdl";
     static final QName SERVICE_NAME = new QName("http://apache.org/type_test/xml", "XMLService");
     static final QName PORT_NAME = new QName("http://apache.org/type_test/xml", "XMLPort");
-
+    static final String PORT = XMLServerImpl.PORT;
+    @Before
+    public void updatePort() throws Exception {
+        updateAddressPort(xmlClient, PORT);
+    }
 
     @BeforeClass
     public static void startServers() throws Exception {

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java Fri Jun 11 18:36:53 2010
@@ -28,7 +28,7 @@ import org.apache.cxf.testutil.common.Ab
 import org.apache.type_test.xml.TypeTestPortType;
 
 public class XMLServerImpl extends AbstractBusTestServerBase {
-
+    public static final String PORT = allocatePort(XMLServerImpl.class);
     public void run()  {
         SpringBusFactory sf = new SpringBusFactory();
         BusFactory.setDefaultBus(null);
@@ -36,7 +36,7 @@ public class XMLServerImpl extends Abstr
             sf.createBus("org/apache/cxf/systest/type_test/databinding-schema-validation.xml"));
 
         Object implementor = new XMLTypeTestImpl();
-        String address = "http://localhost:9008/XMLService/XMLPort/";
+        String address = "http://localhost:" + PORT + "/XMLService/XMLPort/";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java Fri Jun 11 18:36:53 2010
@@ -33,7 +33,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class ClientServerVersioningTest extends AbstractClientServerTestBase {
-
+    private static final String PORT = Server.PORT;
     private final QName portName = new QName("http://apache.org/hello_world_mixedstyle", "SoapPort");
 
     @BeforeClass
@@ -49,6 +49,7 @@ public class ClientServerVersioningTest 
 
         try {
             Greeter greeter = service.getPort(portName, Greeter.class);
+            updateAddressPort(greeter, PORT);
 
             GreetMe1 request = new GreetMe1();
             request.setRequestType("Bonjour");

Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java?rev=953817&r1=953816&r2=953817&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java Fri Jun 11 18:36:53 2010
@@ -28,9 +28,10 @@ import org.apache.hello_world_mixedstyle
 
 
 public class Server extends AbstractBusTestServerBase {
-
+    public static final String PORT = allocatePort(Server.class);
+    
     protected void run() {
-        String address = "http://localhost:9027/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
 
         Object implementor1 = new GreeterImplMixedStyle(" version1");
         EndpointImpl ep1 = (EndpointImpl) Endpoint.publish(address, implementor1);