Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 60125 invoked from network); 27 Jul 2010 20:49:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Jul 2010 20:49:30 -0000 Received: (qmail 38581 invoked by uid 500); 27 Jul 2010 20:49:30 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 38530 invoked by uid 500); 27 Jul 2010 20:49:30 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 38515 invoked by uid 99); 27 Jul 2010 20:49:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jul 2010 20:49:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jul 2010 20:49:26 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0869E2388B75; Tue, 27 Jul 2010 20:47:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r979862 [16/19] - in /cxf/sandbox/oauth_1.0a: ./ api/ api/src/main/java/org/apache/cxf/ api/src/main/java/org/apache/cxf/endpoint/ api/src/main/java/org/apache/cxf/phase/ api/src/main/java/org/apache/cxf/ws/addressing/ api/src/main/java/org... Date: Tue, 27 Jul 2010 20:47:12 -0000 To: commits@cxf.apache.org From: lmoren@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100727204724.0869E2388B75@eris.apache.org> Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/CallbackClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/CallbackClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/CallbackClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/CallbackClientServerTest.java Tue Jul 27 20:46:55 2010 @@ -37,6 +37,9 @@ 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/nested_callback", "SOAPService"); private static final QName SERVICE_NAME_CALLBACK @@ -62,13 +65,14 @@ public class CallbackClientServerTest ex Object implementor = new CallbackImpl(); - String address = "http://localhost:9005/CallbackContext/NestedCallbackPort"; + String address = "http://localhost:" + CB_PORT + "/CallbackContext/NestedCallbackPort"; Endpoint.publish(address, implementor); URL wsdlURL = getClass().getResource("/wsdl/nested_callback.wsdl"); SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME); ServerPortType port = ss.getPort(PORT_NAME, ServerPortType.class); + updateAddressPort(port, PORT); EndpointReferenceType ref = null; try { @@ -76,6 +80,7 @@ public class CallbackClientServerTest ex SERVICE_NAME_CALLBACK, PORT_NAME_CALLBACK.getLocalPart()); EndpointReferenceUtils.setInterfaceName(ref, PORT_TYPE_CALLBACK); + EndpointReferenceUtils.setAddress(ref, address); } catch (Exception e) { e.printStackTrace(); } Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/Server.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/nested_callback/ServerImpl.java Tue Jul 27 20:46:55 2010 @@ -24,6 +24,7 @@ import java.net.URL; import javax.annotation.Resource; import javax.xml.namespace.QName; +import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; import javax.xml.ws.wsaddressing.W3CEndpointReference; @@ -64,7 +65,7 @@ public class ServerImpl implements Serve 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); @@ -87,6 +88,8 @@ public class ServerImpl implements Serve URL wsdlURL = new URL(wsdlLocation); Service service = Service.create(wsdlURL, serviceName); CallbackPortType port = (CallbackPortType)service.getPort(portName, sei); + ((BindingProvider)port).getRequestContext() + .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address); port.serverSayHi("Sean"); Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java Tue Jul 27 20:46:55 2010 @@ -57,7 +57,7 @@ import org.junit.Test; public class OOBHeaderTest extends AbstractBusClientServerTestBase { - + public static final String PORT = Server.PORT; public static final String CONFIG_FILE = "org/apache/cxf/systest/outofband/header/cxf.xml"; public static final String TEST_HDR_NS = "http://cxf.apache.org/outofband/Header"; @@ -177,7 +177,8 @@ public class OOBHeaderTest extends Abstr assertNotNull("Service is null", service); PutLastTradedPricePortType putLastTradedPrice = service.getPort(portName, - PutLastTradedPricePortType.class); + PutLastTradedPricePortType.class); + updateAddressPort(putLastTradedPrice, PORT); TradePriceData priceData = new TradePriceData(); priceData.setTickerPrice(1.0f); @@ -206,13 +207,13 @@ public class OOBHeaderTest extends Abstr String address = ""; switch (i) { case 0: - address = "http://localhost:9107/SOAPDocLitBareService/SoapPort"; + address = "http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort"; break; case 1: - address = "http://localhost:9107/SOAPDocLitBareService/SoapPortNoHeader"; + address = "http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPortNoHeader"; break; default: - address = "http://localhost:9107/SOAPDocLitBareService/SoapPortHeader"; + address = "http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPortHeader"; } ((BindingProvider)putLastTradedPrice).getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address); Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/Server.java Tue Jul 27 20:46:55 2010 @@ -33,6 +33,7 @@ import org.apache.cxf.Bus; import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class Server extends AbstractBusTestServerBase { + public static final String PORT = allocatePort(Server.class); Bus bus; @@ -55,7 +56,7 @@ public class Server extends AbstractBusT "SOAPService")); props.put(Endpoint.WSDL_PORT, new QName("http://apache.org/hello_world_doc_lit_bare", "SoapPort")); ep.setProperties(props); - ep.publish("http://localhost:9107/SOAPDocLitBareService/SoapPort"); + ep.publish("http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort"); ep = Endpoint.create(implementor); props = new HashMap(2); @@ -64,7 +65,7 @@ public class Server extends AbstractBusT props.put(Endpoint.WSDL_PORT, new QName("http://apache.org/hello_world_doc_lit_bare", "SoapPort")); props.put("endpoint-processes-headers", ""); ep.setProperties(props); - ep.publish("http://localhost:9107/SOAPDocLitBareService/SoapPortNoHeader"); + ep.publish("http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPortNoHeader"); ep = Endpoint.create(implementor); props = new HashMap(2); @@ -73,7 +74,7 @@ public class Server extends AbstractBusT props.put(Endpoint.WSDL_PORT, new QName("http://apache.org/hello_world_doc_lit_bare", "SoapPort")); props.put("endpoint-processes-headers", "{http://cxf.apache.org/outofband/Header}outofbandHeader"); ep.setProperties(props); - ep.publish("http://localhost:9107/SOAPDocLitBareService/SoapPortHeader"); + ep.publish("http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPortHeader"); } Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java Tue Jul 27 20:46:55 2010 @@ -26,13 +26,13 @@ import javax.xml.ws.Service; import org.apache.cxf.endpoint.ServiceContractResolverRegistry; import org.apache.cxf.endpoint.ServiceContractResolverRegistryImpl; -import org.apache.cxf.systest.jca.OutBoundConnectionTest.Server; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.hello_world_soap_http.Greeter; import org.junit.BeforeClass; import org.junit.Test; public class JarResolverTest extends AbstractBusClientServerTestBase { + public static final String PORT = Server.PORT; private final QName serviceName = new QName("http://apache.org/hello_world_soap_http", "SOAPService"); private final QName portName = new QName("http://apache.org/hello_world_soap_http", "SoapPort"); @@ -61,6 +61,7 @@ public class JarResolverTest extends Abs //service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, // "http://localhost:9000/SoapContext/SoapPort"); Greeter greeter = service.getPort(portName, Greeter.class); + updateAddressPort(greeter, PORT); String resp = greeter.sayHi(); assertNotNull(resp); Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/Server.java Tue Jul 27 20:46:55 2010 @@ -25,9 +25,10 @@ import org.apache.cxf.testutil.common.Ab import org.apache.hello_world_soap_http.GreeterImpl; public class Server extends AbstractBusTestServerBase { + public static final String PORT = allocatePort(Server.class); protected void run() { Object implementor = new GreeterImpl(); - String address = "http://localhost:9000/SoapContext/SoapPort"; + String address = "http://localhost:" + PORT + "/SoapContext/SoapPort"; Endpoint.publish(address, implementor); } Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/BookServer.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/BookServer.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/BookServer.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/BookServer.java Tue Jul 27 20:46:55 2010 @@ -37,7 +37,7 @@ import org.codehaus.jettison.mapped.Mapp import org.codehaus.jettison.mapped.MappedXMLOutputFactory; public class BookServer extends AbstractBusTestServerBase { - + public static final String PORT = allocatePort(BookServer.class); protected void run() { //book service in unwrapped style BookServiceImpl serviceObj = new BookServiceImpl(); @@ -45,7 +45,7 @@ public class BookServer extends Abstract sf.setServiceClass(BookService.class); // Use the HTTP Binding which understands the Java Rest Annotations sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); - sf.setAddress("http://localhost:9080/xml/"); + sf.setAddress("http://localhost:" + PORT + "/xml/"); sf.getServiceFactory().setInvoker(new BeanInvoker(serviceObj)); // Turn the "wrapped" style off. This means that CXF won't generate @@ -62,7 +62,7 @@ public class BookServer extends Abstract sfWrapped.setServiceClass(BookServiceWrapped.class); // Use the HTTP Binding which understands the Java Rest Annotations sfWrapped.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); - sfWrapped.setAddress("http://localhost:9080/xmlwrapped"); + sfWrapped.setAddress("http://localhost:" + PORT + "/xmlwrapped"); sfWrapped.getServiceFactory().setInvoker(new BeanInvoker(serviceWrappedObj)); sfWrapped.create(); @@ -71,7 +71,7 @@ public class BookServer extends Abstract sfJson.setServiceClass(BookService.class); // Use the HTTP Binding which understands the Java Rest Annotations sfJson.setBindingId(HttpBindingFactory.HTTP_BINDING_ID); - sfJson.setAddress("http://localhost:9080/json"); + sfJson.setAddress("http://localhost:" + PORT + "/json"); sfJson.getServiceFactory().setInvoker(new BeanInvoker(serviceObj)); // Turn the "wrapped" style off. This means that CXF won't generate Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/HttpBindingServer.java Tue Jul 27 20:46:55 2010 @@ -25,10 +25,10 @@ import javax.xml.ws.http.HTTPBinding; import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class HttpBindingServer extends AbstractBusTestServerBase { - + public static final String PORT = allocatePort(HttpBindingServer.class); protected void run() { Endpoint e = Endpoint.create(HTTPBinding.HTTP_BINDING, new RestSourcePayloadProviderHttpBinding()); - String address = "http://localhost:9024/XMLService/RestProviderPort/Customer"; + String address = "http://localhost:" + PORT + "/XMLService/RestProviderPort/Customer"; e.publish(address); } Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java Tue Jul 27 20:46:55 2010 @@ -51,6 +51,7 @@ import org.junit.Test; public class RestClientServerBookTest extends AbstractBusClientServerTestBase { + public static final String PORT = BookServer.PORT; static final Logger LOG = LogUtils.getLogger(RestClientServerBookTest.class); @BeforeClass @@ -68,7 +69,7 @@ public class RestClientServerBookTest ex // Use the HTTP Binding which understands the Java Rest Annotations sf.getClientFactoryBean().setBindingId(HttpBindingFactory.HTTP_BINDING_ID); - sf.setAddress("http://localhost:9080/xml/"); + sf.setAddress("http://localhost:" + PORT + "/xml/"); BookService bs = (BookService)sf.create(); GetBook getBook = new GetBook(); getBook.setId(123); @@ -87,7 +88,7 @@ public class RestClientServerBookTest ex // Use the HTTP Binding which understands the Java Rest Annotations sf.getClientFactoryBean().setBindingId(HttpBindingFactory.HTTP_BINDING_ID); - sf.setAddress("http://localhost:9080/xml/"); + sf.setAddress("http://localhost:" + PORT + "/xml/"); BookService bs = (BookService)sf.create(); GetAnotherBook getAnotherBook = new GetAnotherBook(); getAnotherBook.setId(123); @@ -104,7 +105,7 @@ public class RestClientServerBookTest ex // Use the HTTP Binding which understands the Java Rest Annotations sf.getClientFactoryBean().setBindingId(HttpBindingFactory.HTTP_BINDING_ID); - sf.setAddress("http://localhost:9080/xmlwrapped/"); + sf.setAddress("http://localhost:" + PORT + "/xmlwrapped/"); BookServiceWrapped bs = (BookServiceWrapped)sf.create(); Book book = bs.getBook(123); assertEquals(book.getId(), (long)123); @@ -114,7 +115,7 @@ public class RestClientServerBookTest ex @Test public void testGetBookWrappedUsingURL() throws Exception { String endpointAddress = - "http://localhost:9080/xmlwrapped/books/123"; + "http://localhost:" + PORT + "/xmlwrapped/books/123"; URL url = new URL(endpointAddress); InputStream in = url.openStream(); assertNotNull(in); @@ -138,7 +139,7 @@ public class RestClientServerBookTest ex @Test public void testGetBooksJSON() throws Exception { String endpointAddress = - "http://localhost:9080/json/books"; + "http://localhost:" + PORT + "/json/books"; URL url = new URL(endpointAddress); InputStream in = url.openStream(); assertNotNull(in); @@ -151,7 +152,7 @@ public class RestClientServerBookTest ex @Test public void testGetBookJSON() throws Exception { String endpointAddress = - "http://localhost:9080/json/books/123"; + "http://localhost:" + PORT + "/json/books/123"; URL url = new URL(endpointAddress); InputStream in = url.openStream(); assertNotNull(in); @@ -164,7 +165,7 @@ public class RestClientServerBookTest ex @Test public void testAddBookJSON() throws Exception { String endpointAddress = - "http://localhost:9080/json/books"; + "http://localhost:" + PORT + "/json/books"; File input = new File(getClass().getResource("resources/add_book_json.txt").toURI()); PostMethod post = new PostMethod(endpointAddress); Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerHttpBindingTest.java Tue Jul 27 20:46:55 2010 @@ -44,6 +44,7 @@ import org.junit.BeforeClass; import org.junit.Test; public class RestClientServerHttpBindingTest extends AbstractBusClientServerTestBase { + public static final String PORT = HttpBindingServer.PORT; private final QName serviceName = new QName("http://apache.org/hello_world_xml_http/wrapped", "XMLService"); @@ -51,7 +52,7 @@ public class RestClientServerHttpBinding "RestProviderPort"); private final String endpointAddress = - "http://localhost:9024/XMLService/RestProviderPort/Customer"; + "http://localhost:" + PORT + "/XMLService/RestProviderPort/Customer"; @BeforeClass public static void startServers() throws Exception { Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/RestClientServerTest.java Tue Jul 27 20:46:55 2010 @@ -50,6 +50,7 @@ import org.junit.BeforeClass; import org.junit.Test; public class RestClientServerTest extends AbstractBusClientServerTestBase { + public static final String PORT = Server.PORT; private final QName serviceName = new QName("http://apache.org/hello_world_xml_http/wrapped", "XMLService"); @@ -57,7 +58,7 @@ public class RestClientServerTest extend "RestProviderPort"); private final String endpointAddress = - "http://localhost:9023/XMLService/RestProviderPort/Customer"; + "http://localhost:" + PORT + "/XMLService/RestProviderPort/Customer"; @BeforeClass public static void startServers() throws Exception { @@ -78,6 +79,7 @@ public class RestClientServerTest extend assertNotNull(reqMsg); Dispatch disp = service.createDispatch(portName, DOMSource.class, Service.Mode.PAYLOAD); + updateAddressPort(disp, PORT); DOMSource result = disp.invoke(reqMsg); assertNotNull(result); Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/rest/Server.java Tue Jul 27 20:46:55 2010 @@ -24,10 +24,10 @@ 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 RestSourcePayloadProvider(); - String address = "http://localhost:9023/XMLService/RestProviderPort/Customer"; + String address = "http://localhost:" + PORT + "/XMLService/RestProviderPort/Customer"; Endpoint.publish(address, implementor); } Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java Tue Jul 27 20:46:55 2010 @@ -37,6 +37,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"); @@ -60,6 +61,7 @@ public class ValidationClientServerTest assertNotNull(service); SchemaValidation validation = service.getPort(portName, SchemaValidation.class); + updateAddressPort(validation, PORT); ((BindingProvider)validation).getRequestContext() .put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE); Modified: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java Tue Jul 27 20:46:55 2010 @@ -25,13 +25,14 @@ 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); public ValidationServer() { } 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap/SoapActionTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java Tue Jul 27 20:46:55 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,12 +108,12 @@ 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()); - assertEquals("Internal Server Error", httpConnection.getResponseMessage()); + assertEquals("Server Error", httpConnection.getResponseMessage()); InputStream in = httpConnection.getErrorStream(); assertNotNull(in); @@ -147,14 +149,14 @@ 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()); assertEquals("application/soap+xml; charset=utf-8", httpConnection.getContentType().toLowerCase()); - assertEquals("Internal Server Error", httpConnection.getResponseMessage()); + assertEquals("Server Error", httpConnection.getResponseMessage()); InputStream in = httpConnection.getErrorStream(); assertNotNull(in); @@ -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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/HeaderClientServerTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/soapheader/Server.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/Server.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleFindClientServerTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/AppleServer.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Server.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/TypeSubClientServerTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/ClientServerVersioningTest.java Tue Jul 27 20:46:55 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/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/versioning/Server.java Tue Jul 27 20:46:55 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); Propchange: cxf/sandbox/oauth_1.0a/systests/uncategorized/src/test/java/org/apache/cxf/systest/wsdl/CrossSchemaImportsTests.java ('svn:mergeinfo' removed) Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/pom.xml URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/pom.xml?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/pom.xml (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/pom.xml Tue Jul 27 20:46:55 2010 @@ -79,8 +79,8 @@ - org.apache.geronimo.specs - geronimo-servlet_2.5_spec + ${servlet-api.group} + ${servlet-api.artifact} org.apache.cxf Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java Tue Jul 27 20:46:55 2010 @@ -24,10 +24,11 @@ import org.apache.cxf.jaxws.EndpointImpl import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class Server extends AbstractBusTestServerBase { + static final String PORT = allocatePort(Server.class); protected void run() { Object implementor = new AddNumberImpl(); - String address = "http://localhost:9095/jaxws/add"; + String address = "http://localhost:" + PORT + "/jaxws/add"; EndpointImpl ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java Tue Jul 27 20:46:55 2010 @@ -39,6 +39,7 @@ import org.junit.BeforeClass; import org.junit.Test; public class WSADisableTest extends AbstractWSATestBase { + static final String PORT = allocatePort(Server.class); private final QName serviceName = new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersService"); @@ -61,7 +62,8 @@ public class WSADisableTest extends Abst AddNumbersPortType port = getService().getAddNumbersPort(); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9095/jaxws/add"); + "http://localhost:" + + PORT + "/jaxws/add"); assertEquals(3, port.addNumbers(1, 2)); @@ -81,7 +83,8 @@ public class WSADisableTest extends Abst AddNumbersPortType port = getService().getAddNumbersPort(new AddressingFeature(false)); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9095/jaxws/add"); + "http://localhost:" + + PORT + "/jaxws/add"); assertEquals(3, port.addNumbers(1, 2)); @@ -101,7 +104,8 @@ public class WSADisableTest extends Abst javax.xml.ws.Service.Mode.MESSAGE, new AddressingFeature(false)); ((BindingProvider)disptch).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9095/jaxws/add"); + "http://localhost:" + + PORT + "/jaxws/add"); InputStream is = getClass().getResourceAsStream("resources/AddNumbersDispatchReq.xml"); SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is); Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java Tue Jul 27 20:46:55 2010 @@ -26,10 +26,11 @@ import org.apache.cxf.testutil.common.Ab import org.apache.cxf.ws.addressing.WSAddressingFeature; public class Server extends AbstractBusTestServerBase { + static final String PORT = allocatePort(Server.class); protected void run() { Object implementor = new AddNumberImpl(); - String address = "http://localhost:9091/jaxws/add"; + String address = "http://localhost:" + PORT + "/jaxws/add"; //Endpoint.publish(address, implementor); EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor); Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java Tue Jul 27 20:46:55 2010 @@ -32,6 +32,7 @@ import org.junit.BeforeClass; import org.junit.Test; public class WSAClientServerTest extends AbstractWSATestBase { + static final String PORT = allocatePort(Server.class); private final QName serviceName = new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersService"); @@ -53,7 +54,7 @@ public class WSAClientServerTest extends JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(AddNumbersPortType.class); - factory.setAddress("http://localhost:9091/jaxws/add"); + factory.setAddress("http://localhost:" + PORT + "/jaxws/add"); AddNumbersPortType port = (AddNumbersPortType) factory.create(); assertEquals(3, port.addNumbers(1, 2)); @@ -72,7 +73,7 @@ public class WSAClientServerTest extends JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(AddNumbersPortType.class); - factory.setAddress("http://localhost:9091/jaxws/add"); + factory.setAddress("http://localhost:" + PORT + "/jaxws/add"); factory.getFeatures().add(new WSAddressingFeature()); AddNumbersPortType port = (AddNumbersPortType) factory.create(); @@ -101,12 +102,14 @@ public class WSAClientServerTest extends assertTrue(input.toString().indexOf(expectedIn) != -1); } - private AddNumbersPortType getPort() { + private AddNumbersPortType getPort() throws Exception { URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl"); assertNotNull("WSDL is null", wsdl); AddNumbersService service = new AddNumbersService(wsdl, serviceName); assertNotNull("Service is null ", service); - return service.getAddNumbersPort(new AddressingFeature()); + AddNumbersPortType port = service.getAddNumbersPort(new AddressingFeature()); + updateAddressPort(port, PORT); + return port; } } Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java Tue Jul 27 20:46:55 2010 @@ -35,7 +35,8 @@ import org.junit.BeforeClass; import org.junit.Test; public class WSAFromJavaTest extends AbstractWSATestBase { - + static final String PORT = allocatePort(Server.class); + @Before public void setUp() throws Exception { createBus(); @@ -63,7 +64,7 @@ public class WSAFromJavaTest extends Abs } @Test - public void testAddNumbersFault() { + public void testAddNumbersFault() throws Exception { ByteArrayOutputStream input = setupInLogging(); ByteArrayOutputStream output = setupOutLogging(); @@ -104,7 +105,7 @@ public class WSAFromJavaTest extends Abs } @Test - public void testAddNumbers3Fault() { + public void testAddNumbers3Fault() throws Exception { ByteArrayOutputStream input = setupInLogging(); ByteArrayOutputStream output = setupOutLogging(); @@ -144,14 +145,16 @@ public class WSAFromJavaTest extends Abs assertTrue(output.toString().indexOf("SOAPAction=[\"cxf\"]") != -1); } - private AddNumberImpl getPort() { + private AddNumberImpl getPort() throws Exception { URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers-fromjava.wsdl"); assertNotNull("WSDL is null", wsdl); AddNumberImplService service = new AddNumberImplService(wsdl); assertNotNull("Service is null ", service); - return service.getAddNumberImplPort(); + AddNumberImpl port = service.getAddNumberImplPort(); + updateAddressPort(port, PORT); + return port; } @Test Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java Tue Jul 27 20:46:55 2010 @@ -24,10 +24,11 @@ import org.apache.cxf.testutil.common.Ab import org.apache.cxf.ws.addressing.WSAddressingFeature; public class Server extends AbstractBusTestServerBase { - + static final String PORT = allocatePort(Server.class); + protected void run() { Object implementor = new AddNumberImpl(); - String address = "http://localhost:9093/AddNumberImplPort"; + String address = "http://localhost:" + PORT + "/AddNumberImplPort"; EndpointImpl ep = new EndpointImpl(implementor); Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java Tue Jul 27 20:46:55 2010 @@ -29,6 +29,8 @@ import org.apache.cxf.testutil.common.Ab import org.apache.cxf.ws.addressing.WSAddressingFeature; public class Server extends AbstractBusTestServerBase { + static final String PORT = allocatePort(Server.class); + @WebService(serviceName = "AddNumbersService", portName = "AddNumbersPort", targetNamespace = "http://apache.org/cxf/systest/ws/addr_feature/") @@ -49,7 +51,7 @@ public class Server extends AbstractBusT } protected void run() { Object implementor = new AddNumberReg(); - String address = "http://localhost:9091/jaxws/add"; + String address = "http://localhost:" + PORT + "/jaxws/add"; EndpointImpl ep; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, @@ -60,7 +62,7 @@ public class Server extends AbstractBusT ep.publish(address); implementor = new AddNumberNonAnon(); - address = "http://localhost:9091/jaxws/addNonAnon"; + address = "http://localhost:" + PORT + "/jaxws/addNonAnon"; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, @@ -71,7 +73,7 @@ public class Server extends AbstractBusT ep.publish(address); implementor = new AddNumberOnlyAnon(); - address = "http://localhost:9091/jaxws/addAnon"; + address = "http://localhost:" + PORT + "/jaxws/addAnon"; ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java Tue Jul 27 20:46:55 2010 @@ -39,7 +39,9 @@ import org.junit.BeforeClass; import org.junit.Test; public class WSAFromWSDLTest extends AbstractWSATestBase { - + static final String PORT = allocatePort(Server.class); + static final String INVALID_PORT = allocatePort(Server.class, 1); + private static final String BASE_URI = "http://apache.org/cxf/systest/ws/addr_feature/" + "AddNumbersPortType/"; @@ -157,7 +159,7 @@ public class WSAFromWSDLTest extends Abs AddNumbersPortType port = getPort(); ((BindingProvider)port).getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9091/jaxws/addNonAnon"); + "http://localhost:" + PORT + "/jaxws/addNonAnon"); try { port.addNumbers3(-1, 2); } catch (SOAPFaultException e) { @@ -169,12 +171,12 @@ public class WSAFromWSDLTest extends Abs AddNumbersPortType port = getPort(); ((BindingProvider)port).getRequestContext() .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9091/jaxws/addAnon"); + "http://localhost:" + PORT + "/jaxws/addAnon"); AddressingPropertiesImpl maps = new AddressingPropertiesImpl(); EndpointReferenceType ref = new EndpointReferenceType(); AttributedURIType add = new AttributedURIType(); - add.setValue("http://localhost:9095/not/a/real/url"); + add.setValue("http://localhost:" + INVALID_PORT + "/not/a/real/url"); ref.setAddress(add); maps.setReplyTo(ref); maps.setFaultTo(ref); @@ -188,12 +190,14 @@ public class WSAFromWSDLTest extends Abs assertTrue(e.getFault().getFaultCode().contains("OnlyAnonymousAddressSupported")); } } - private AddNumbersPortType getPort() { + private AddNumbersPortType getPort()throws Exception { URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl"); assertNotNull("WSDL is null", wsdl); AddNumbersService service = new AddNumbersService(wsdl, serviceName); assertNotNull("Service is null ", service); - return service.getAddNumbersPort(new AddressingFeature()); + AddNumbersPortType port = service.getAddNumbersPort(new AddressingFeature()); + updateAddressPort(port, PORT); + return port; } } Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java Tue Jul 27 20:46:55 2010 @@ -46,10 +46,11 @@ import org.apache.cxf.jaxws.EndpointImpl import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class Server extends AbstractBusTestServerBase { + static final String PORT = allocatePort(Server.class); protected void run() { Object implementor = new AddNumberImpl(); - String address = "http://localhost:9094/jaxws/add"; + String address = "http://localhost:" + PORT + "/jaxws/add"; EndpointImpl ep = new EndpointImpl(BusFactory.getThreadDefaultBus(), implementor, Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java Tue Jul 27 20:46:55 2010 @@ -51,7 +51,8 @@ import org.junit.BeforeClass; import org.junit.Test; public class WSAPureWsdlTest extends AbstractWSATestBase { - + static final String PORT = allocatePort(Server.class); + private final QName serviceName = new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersService"); @@ -74,7 +75,7 @@ public class WSAPureWsdlTest extends Abs AddNumbersPortType port = getPort(); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/jaxws/add"); + "http://localhost:" + PORT + "/jaxws/add"); assertEquals(3, port.addNumbers(1, 2)); @@ -90,7 +91,7 @@ public class WSAPureWsdlTest extends Abs assertEquals(3, resp.get().getReturn()); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/doesntexist"); + "http://localhost:" + PORT + "/doesntexist"); resp = port.addNumbers3Async(1, 2); try { resp.get(); @@ -115,7 +116,7 @@ public class WSAPureWsdlTest extends Abs AddNumbersPortType port = getPort(); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/jaxws/add-provider"); + "http://localhost:" + PORT + "/jaxws/add-provider"); assertEquals(3, port.addNumbers(1, 2)); @@ -126,7 +127,7 @@ public class WSAPureWsdlTest extends Abs input.reset(); ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/jaxws/add-providernows"); + "http://localhost:" + PORT + "/jaxws/add-providernows"); assertEquals(3, port.addNumbers(1, 2)); assertTrue(output.toString().indexOf(expectedOut) != -1); @@ -154,7 +155,7 @@ public class WSAPureWsdlTest extends Abs Source.class, Mode.PAYLOAD); disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/jaxws/add"); + "http://localhost:" + PORT + "/jaxws/add"); //manually set the action disp.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, @@ -172,7 +173,7 @@ public class WSAPureWsdlTest extends Abs Source.class, Mode.PAYLOAD); disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/jaxws/add"); + "http://localhost:" + PORT + "/jaxws/add"); //set the operation name so action can be pulled from the wsdl disp.getRequestContext().put(MessageContext.WSDL_OPERATION, @@ -205,7 +206,7 @@ public class WSAPureWsdlTest extends Abs Source.class, Mode.MESSAGE); disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, - "http://localhost:9094/jaxws/add"); + "http://localhost:" + PORT + "/jaxws/add"); //manually set the action disp.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/WSDLAddrPolicyAttachmentJaxwsMMProviderTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/WSDLAddrPolicyAttachmentJaxwsMMProviderTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/WSDLAddrPolicyAttachmentJaxwsMMProviderTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/WSDLAddrPolicyAttachmentJaxwsMMProviderTest.java Tue Jul 27 20:46:55 2010 @@ -45,10 +45,13 @@ import messaging.AsyncMessaging; import messaging.AsyncMessagingService; public class WSDLAddrPolicyAttachmentJaxwsMMProviderTest extends AbstractBusClientServerTestBase { + public static final String PORT = allocatePort(Server.class); + public static final String DECOUPLED = allocatePort("decoupled"); private static final Logger LOG = LogUtils.getLogger(WSDLAddrPolicyAttachmentJaxwsMMProviderTest.class); - private static final String ADDRESS = "http://localhost:9000/AsyncMessagingServiceProvider"; + private static final String ADDRESS = "http://localhost:" + + PORT + "/AsyncMessagingServiceProvider"; private static final String WSDL_ADDRESS = ADDRESS + "?wsdl"; private static final QName ENDPOINT_NAME = new QName("http://messaging/", "AsyncMessagingService"); Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/DecoupledJMSTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/DecoupledJMSTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/DecoupledJMSTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/DecoupledJMSTest.java Tue Jul 27 20:46:55 2010 @@ -19,6 +19,7 @@ package org.apache.cxf.systest.ws.addressing; +import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Map; @@ -38,7 +39,8 @@ import org.junit.Test; public class DecoupledJMSTest extends MAPTestBase { private static final String ADDRESS = "jms:jndi:dynamicQueues/testqueue0001?" + "jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory" - + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500"; + + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:" + + EmbeddedJMSBrokerLauncher.PORT; private static final String CONFIG = @@ -47,7 +49,9 @@ public class DecoupledJMSTest extends MA public String getConfigFileName() { return CONFIG; } - + protected void updateAddressPort(Object o, int port) throws MalformedURLException { + } + @Test @Override public void testImplicitMAPs() throws Exception { Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java Tue Jul 27 20:46:55 2010 @@ -33,7 +33,7 @@ import org.junit.Test; * Tests the addition of WS-Addressing Message Addressing Properties. */ public class MAPTest extends MAPTestBase { - static final String ADDRESS = "http://localhost:9008/SoapContext/SoapPort"; + static final String ADDRESS = "http://localhost:" + PORT + "/SoapContext/SoapPort"; private static final String CONFIG; static { Modified: cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java URL: http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java?rev=979862&r1=979861&r2=979862&view=diff ============================================================================== --- cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java (original) +++ cxf/sandbox/oauth_1.0a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java Tue Jul 27 20:46:55 2010 @@ -64,7 +64,9 @@ import static org.apache.cxf.ws.addressi * Tests the addition of WS-Addressing Message Addressing Properties. */ public abstract class MAPTestBase extends AbstractClientServerTestBase implements VerificationCache { - + protected static final String PORT = allocatePort(MAPTestBase.class); + protected static final String DECOUPLE_PORT = allocatePort(MAPTestBase.class, 1); + protected static Bus staticBus; static final String INBOUND_KEY = "inbound"; @@ -142,10 +144,12 @@ public abstract class MAPTestBase extend public URL getWSDLURL() { return getClass().getResource("/wsdl/hello_world.wsdl"); } - public Greeter createGreeter(EndpointReferenceType target) { + public Greeter createGreeter(EndpointReferenceType target) throws Exception { ServiceImpl serviceImpl = ServiceDelegateAccessor.get(new SOAPService(getWSDLURL(), SERVICE_NAME)); - return serviceImpl.getPort(target, Greeter.class); + Greeter g = serviceImpl.getPort(target, Greeter.class); + updateAddressPort(g, PORT); + return g; } @After