cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r951551 [1/3] - in /cxf/trunk: rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/ systests/transports/src/te...
Date Fri, 04 Jun 2010 20:13:20 GMT
Author: dkulp
Date: Fri Jun  4 20:13:17 2010
New Revision: 951551

URL: http://svn.apache.org/viewvc?rev=951551&view=rev
Log:
Update all the ws-specs tests to use dynamic ports and all of the JMS
stuff in the system tests to use a dynamic port for the broker

Added:
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/PolicyTestHelper.java
      - copied, changed from r951549, cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/Server.java
Modified:
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSJmsTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSBookStore.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/jms_server_config.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/AbstractSOAPJMSTestSuite.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/Server.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/HttpNumberFactoryImpl.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualNumberFactoryImpl.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/NumberFactoryImpl.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/WSDLAddrPolicyAttachmentJaxwsMMProviderTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/DecoupledJMSTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/cxf-hpux.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/cxf.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/jms_decoupled.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/spring/WSAFeatureTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/spring/WSAFeatureXmlTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingInlinePolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingOptionalPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/AddressingPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPClientPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/HTTPServerPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/addr-inline-policy-old.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/addr-inline-policy.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/addr-optional.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/addr.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http_client_policy_feature.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rm.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rmwsdl.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rmwsdl_server.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/decoupled.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/rm/decoupled_bare.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/https_config.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/server.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssc/server/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssc/server/server.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10Test.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/WSSecurity10UsernameAuthorizationTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/server/AuthorizedServer.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/server/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/server/server.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/server/server_restricted.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/server/server_restricted_authorized.xml
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/server/Server.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/server/ServerRestricted.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractClientServerTestBase.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/EmbeddedJMSBrokerLauncher.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java (original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java Fri Jun  4 20:13:17 2010
@@ -738,9 +738,21 @@ public class MAPAggregator extends Abstr
                 if (isOutbound) {
                     conduit = ContextUtils.getConduit(conduit, message);
                 }
+                String s = (String)message.get(Message.ENDPOINT_ADDRESS);
                 EndpointReferenceType reference = conduit != null
                                                   ? conduit.getTarget()
                                                   : ContextUtils.getNoneEndpointReference();
+                if (conduit != null && !StringUtils.isEmpty(s) 
+                    && !reference.getAddress().getValue().equals(s)) {
+                    EndpointReferenceType ref = new EndpointReferenceType();
+                    AttributedURIType tp = new AttributedURIType();
+                    tp.setValue(s);
+                    ref.setAddress(tp);
+                    ref.setMetadata(reference.getMetadata());
+                    ref.setReferenceParameters(reference.getReferenceParameters());
+                    ref.getOtherAttributes().putAll(reference.getOtherAttributes());
+                    reference = ref;
+                }
                 maps.setTo(reference);
             }
 

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSJmsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSJmsTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSJmsTest.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSJmsTest.java Fri Jun  4 20:13:17 2010
@@ -47,8 +47,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JAXRSJmsTest extends AbstractBusClientServerTestBase {
-
     protected static boolean serversStarted;
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
     
     @BeforeClass
     public static void startServers() throws Exception {
@@ -167,7 +167,7 @@ public class JAXRSJmsTest extends Abstra
         Properties props = new Properties();
         props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
                           "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-        props.setProperty(Context.PROVIDER_URL, "tcp://localhost:61500");
+        props.setProperty(Context.PROVIDER_URL, "tcp://localhost:" + JMS_PORT);
         return new InitialContext(props);
         
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSBookStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSBookStore.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSBookStore.java (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JMSBookStore.java Fri Jun  4 20:13:17 2010
@@ -47,6 +47,7 @@ import javax.xml.bind.Marshaller;
 
 import org.apache.cxf.jaxrs.ext.Oneway;
 import org.apache.cxf.jaxrs.ext.ProtocolHeaders;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.JMSUtils;
 
 @Path("/bookstore")
@@ -135,7 +136,7 @@ public class JMSBookStore {
         Properties props = new Properties();
         props.setProperty(Context.INITIAL_CONTEXT_FACTORY,
                           "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-        props.setProperty(Context.PROVIDER_URL, "tcp://localhost:61500");
+        props.setProperty(Context.PROVIDER_URL, "tcp://localhost:" + EmbeddedJMSBrokerLauncher.PORT);
         return new InitialContext(props);
         
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/jms_server_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/jms_server_config.xml?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/jms_server_config.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/resources/jms_server_config.xml Fri Jun  4 20:13:17 2010
@@ -33,9 +33,11 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
   <import resource="classpath:META-INF/cxf/cxf.xml" />
   <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />  
   <import resource="classpath:META-INF/cxf/cxf-extension-jms.xml" />
+
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
     
   <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
-  	p:brokerURL="tcp://localhost:61500"/>
+  	p:brokerURL="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
   
   <bean id="singleConnectionFactory"
     class="org.springframework.jms.connection.SingleConnectionFactory" destroy-method="destroy">
@@ -53,7 +55,7 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
       <jms:address jndiConnectionFactoryName="ConnectionFactory" 
                    jndiDestinationName="dynamicQueues/test.jmstransport.text">
                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
                </jms:address>
       <jms:jmsConfig-ref>jmsConfig</jms:jmsConfig-ref>  
   </jms:destination>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/AbstractSOAPJMSTestSuite.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/AbstractSOAPJMSTestSuite.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/AbstractSOAPJMSTestSuite.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/AbstractSOAPJMSTestSuite.java Fri Jun  4 20:13:17 2010
@@ -33,6 +33,7 @@ import org.apache.cxf.jms.testsuite.util
 import org.apache.cxf.testsuite.testcase.MessagePropertiesType;
 import org.apache.cxf.testsuite.testcase.TestCaseType;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.JMSConfiguration;
 import org.apache.cxf.transport.jms.JMSFactory;
 import org.apache.cxf.transport.jms.JMSMessageHeadersType;
@@ -58,7 +59,7 @@ public abstract class AbstractSOAPJMSTes
         QName qServiceName = new QName(namespace, serviceName);
         QName qPortName = new QName(namespace, portName);
         URL wsdl = getClass().getResource("/wsdl/jms_spec_testsuite.wsdl");
-
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdl.toString());
         Class<? extends Service> svcls = serviceClass.asSubclass(Service.class);
 
         Constructor<? extends Service> serviceConstructor = svcls.getConstructor(URL.class,

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java Fri Jun  4 20:13:17 2010
@@ -60,7 +60,8 @@ import org.junit.Test;
  * 
  */
 public class SOAPJMSTestSuiteTest extends AbstractSOAPJMSTestSuite {
-
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    
     @BeforeClass
     public static void startServers() throws Exception {
         Map<String, String> props = new HashMap<String, String>();
@@ -73,7 +74,7 @@ public class SOAPJMSTestSuiteTest extend
                                                                    props, null));
         assertTrue("server did not launch correctly", launchServer(Server.class, false));
     }
-
+    
     private void oneWayTest(TestCaseType testcase, JMSSimplePortType port) throws Exception {
         InvocationHandler handler = Proxy.getInvocationHandler(port);
         BindingProvider bp = (BindingProvider)handler;

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java Fri Jun  4 20:13:17 2010
@@ -37,6 +37,7 @@ import javax.xml.bind.Unmarshaller;
 import org.apache.cxf.testsuite.testcase.MessagePropertiesType;
 import org.apache.cxf.testsuite.testcase.TestCaseType;
 import org.apache.cxf.testsuite.testcase.TestCasesType;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.JMSConfiguration;
 import org.apache.cxf.transport.jms.JMSFactory;
 import org.apache.cxf.transport.jms.JMSOldConfigHolder;
@@ -91,6 +92,19 @@ public final class JMSTestUtil {
         JAXBElement e = (JAXBElement)unmarshaller.unmarshal(new JMSTestUtil().getClass()
             .getResource("/org/apache/cxf/jms/testsuite/util/testcases.xml"));
         testcases = (TestCasesType)e.getValue();
+        for (TestCaseType tct : testcases.getTestCase()) {
+            if (tct.isSetAddress()) {
+                String add = tct.getAddress();
+                int idx = add.indexOf("jndiURL=");
+                if (idx != -1) {
+                    int idx2 = add.indexOf("&", idx);
+                    add = add.substring(0, idx)
+                        + "jndiURL=tcp://localhost:" + EmbeddedJMSBrokerLauncher.PORT
+                        + (idx2 == -1 ? "" : add.substring(idx2));
+                    tct.setAddress(add);
+                }
+            }
+        }
     }
 
     public static JmsTemplate getJmsTemplate(String address) throws Exception {

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -45,6 +45,8 @@ import javax.xml.ws.soap.SOAPBinding;
 import javax.xml.ws.soap.SOAPFaultException;
 
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.hello_world_jms.BadRecordLitFault;
@@ -99,7 +101,8 @@ import org.springframework.jms.support.d
 import org.springframework.jndi.JndiTemplate;
 
 public class JMSClientServerTest extends AbstractBusClientServerTestBase {
-    
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = Server.PORT;
     @BeforeClass
     public static void startServers() throws Exception {
         Map<String, String> props = new HashMap<String, String>();                
@@ -114,10 +117,13 @@ public class JMSClientServerTest extends
 
         assertTrue("server did not launch correctly", 
                    launchServer(Server.class, false));
+        
     }
     
     public URL getWSDLURL(String s) throws Exception {
-        return getClass().getResource(s);
+        URL u = getClass().getResource(s);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), u.toString());
+        return u;
     }
     public QName getServiceName(QName q) {
         return q;
@@ -141,6 +147,7 @@ public class JMSClientServerTest extends
         String response2 = new String("Bonjour");
         try {
             Greeter greeter = service.getPort(portName, Greeter.class);
+            
             Client client = ClientProxy.getClient(greeter);
             EndpointInfo ei = client.getEndpoint().getEndpointInfo();
             AddressType address = ei.getTraversedExtensor(new AddressType(), AddressType.class);
@@ -414,7 +421,7 @@ public class JMSClientServerTest extends
                                  "HelloWorldPubSubService"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                              "HelloWorldPubSubPort"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldPubSubService service = new HelloWorldPubSubService(wsdl, serviceName);
@@ -438,7 +445,7 @@ public class JMSClientServerTest extends
                                  "JmsDestinationPubSubService"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                              "JmsDestinationPubSubPort"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldPubSubService service = new HelloWorldPubSubService(wsdl, serviceName);
@@ -458,10 +465,14 @@ public class JMSClientServerTest extends
     
     @Test 
     public void testConnectionsWithinSpring() throws Exception {
+        BusFactory.setDefaultBus(null);
+        BusFactory.setThreadDefaultBus(null);
+        
         ClassPathXmlApplicationContext ctx = 
             new ClassPathXmlApplicationContext(
                 new String[] {"/org/apache/cxf/systest/jms/JMSClients.xml"});
-               
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors((Bus)ctx.getBean("cxf"),
+                                                      "classpath:wsdl/jms_test.wsdl");   
         HelloWorldPortType greeter = (HelloWorldPortType)ctx.getBean("jmsRPCClient");
         assertNotNull(greeter);
         
@@ -505,7 +516,9 @@ public class JMSClientServerTest extends
         } catch (Exception ex) {
             fail("There should not throw the exception" + ex);
         }
-        
+        ctx.close();
+        BusFactory.setDefaultBus(getBus());
+        BusFactory.setThreadDefaultBus(getBus());
     }
     
     @Test
@@ -514,7 +527,7 @@ public class JMSClientServerTest extends
                                  "HelloWorldOneWayQueueService"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                              "HelloWorldOneWayQueuePort"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldOneWayQueueService service = new HelloWorldOneWayQueueService(wsdl, serviceName);
@@ -538,8 +551,10 @@ public class JMSClientServerTest extends
                                                      "HelloWorldQueueDecoupledOneWaysService"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                                "HelloWorldQueueDecoupledOneWaysPort"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdl.toString());
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), "testutils/jms_test.wsdl");
 
         HelloWorldQueueDecoupledOneWaysService service = 
             new HelloWorldQueueDecoupledOneWaysService(wsdl, serviceName);
@@ -606,8 +621,9 @@ public class JMSClientServerTest extends
                                                      "HelloWorldQueueDecoupledOneWaysService"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                                "HelloWorldQueueDecoupledOneWaysPort"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), "testutils/jms_test.wsdl");
 
         HelloWorldQueueDecoupledOneWaysService service = 
             new HelloWorldQueueDecoupledOneWaysService(wsdl, serviceName);
@@ -725,7 +741,7 @@ public class JMSClientServerTest extends
         QName portNameSales = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                                "HelloWorldPortAppCorrelationIDSales"));
 
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldServiceAppCorrelationID service = 
@@ -783,7 +799,7 @@ public class JMSClientServerTest extends
         QName portNameSales = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                                "HelloWorldPortAppCorrelationIDStaticPrefixSales"));
 
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldServiceAppCorrelationIDStaticPrefix service = 
@@ -834,7 +850,7 @@ public class JMSClientServerTest extends
                                  "HelloWorldServiceAppCorrelationIDNoPrefix"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                                "HelloWorldPortAppCorrelationIDNoPrefix"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldServiceAppCorrelationIDNoPrefix service = 
@@ -904,7 +920,7 @@ public class JMSClientServerTest extends
         QName portNameSales = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                   "HelloWorldPortRuntimeCorrelationIDStaticPrefixSales"));
 
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldServiceRuntimeCorrelationIDStaticPrefix service = 
@@ -950,7 +966,7 @@ public class JMSClientServerTest extends
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
                                                "HelloWorldPortRuntimeCorrelationIDDynamicPrefix"));
         
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldServiceRuntimeCorrelationIDDynamicPrefix service = 
@@ -989,7 +1005,7 @@ public class JMSClientServerTest extends
         QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms",
                                  "HelloWorldService"));
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
-        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
 
         HelloWorldService service = new HelloWorldService(wsdl, serviceName);
@@ -1045,7 +1061,7 @@ public class JMSClientServerTest extends
         QName serviceName = new QName("http://cxf.apache.org/jms_mtom", "JMSMTOMService");
         QName portName = new QName("http://cxf.apache.org/jms_mtom", "MTOMPort");
 
-        URL wsdl = getClass().getResource("/wsdl/jms_test_mtom.wsdl");
+        URL wsdl = getWSDLURL("/wsdl/jms_test_mtom.wsdl");
         assertNotNull(wsdl);
 
         JMSMTOMService service = new JMSMTOMService(wsdl, serviceName);
@@ -1138,7 +1154,7 @@ public class JMSClientServerTest extends
             throw (Exception)ex.getCause();
         }
     }
-    
+
     @Test
     public void testWsdlExtensionSpecJMSPortError() throws Exception {
         QName serviceName = getServiceName(new QName("http://cxf.apache.org/jms_greeter",
@@ -1162,7 +1178,8 @@ public class JMSClientServerTest extends
         String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
             + "?jndiInitialContextFactory"
             + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
+            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
+            + JMS_PORT;
 
         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
         factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
@@ -1212,7 +1229,7 @@ public class JMSClientServerTest extends
     public void testReplyToConfig() throws Exception {
         JMSEndpoint endpoint = new JMSEndpoint();
         endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-        endpoint.setJndiURL("tcp://localhost:61500");
+        endpoint.setJndiURL("tcp://localhost:" + JMS_PORT);
         endpoint.setJndiConnectionFactoryName("ConnectionFactory");
 
         final JMSConfiguration jmsConfig = new JMSConfiguration();        

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/Server.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/Server.java Fri Jun  4 20:13:17 2010
@@ -22,13 +22,16 @@ import javax.xml.ws.Binding;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.soap.SOAPBinding;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
 
 public class Server extends AbstractBusTestServerBase {
-
+    public static final String PORT = allocatePort(Server.class);
 
     protected void run()  {
         Object implementor = new GreeterImplTwoWayJMS();
@@ -49,8 +52,12 @@ public class Server extends AbstractBusT
         Object i8 = new GreeterImplTwoWayJMSAppCorrelationIDSales();
         Object mtom = new JMSMTOMImpl();
         
+        Bus bus = BusFactory.getDefaultBus();
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, "testutils/hello_world_doc_lit.wsdl");
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, "testutils/jms_test.wsdl");
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, "testutils/jms_test_mtom.wsdl");
         Endpoint.publish(null, impleDoc);
-        String address = "http://localhost:9000/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
         Endpoint.publish("http://testaddr.not.required/", impl2);
         Endpoint.publish("http://testaddr.not.required.topic/", impl3);
@@ -74,14 +81,16 @@ public class Server extends AbstractBusT
         String address1 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue2"
                          + "?jndiInitialContextFactory"
                          + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-                         + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
+                         + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
+                         + EmbeddedJMSBrokerLauncher.PORT;
         Endpoint.publish(address1, spec1);
         
         Object spec2 = new GreeterSpecWithPortError();
         String address2 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue5"
             + "?jndiInitialContextFactory"
             + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
+            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
+            + EmbeddedJMSBrokerLauncher.PORT;
         Endpoint.publish(address2, spec2);
         
         initNoWsdlServer();
@@ -95,7 +104,8 @@ public class Server extends AbstractBusT
         String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
             + "?jndiInitialContextFactory"
             + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
+            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
+            + EmbeddedJMSBrokerLauncher.PORT;
         Hello implementor = new HelloImpl();
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
         svrFactory.setServiceClass(Hello.class);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -35,10 +35,14 @@ import org.apache.cxf.systest.http_jetty
 import org.apache.cxf.systest.http_jetty.continuations.HelloContinuationService;
 import org.apache.cxf.systest.http_jetty.continuations.HelloWorker;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
 import org.junit.Before;
 import org.junit.Test;
 
 public class HelloWorldContinuationsClientServerTest extends AbstractBusClientServerTestBase {
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = Server2.PORT;
     
     private static boolean serversStarted;
     private static final String CONFIG_FILE =

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java Fri Jun  4 20:13:17 2010
@@ -41,7 +41,8 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class HelloWorldContinuationsThrottleTest extends AbstractBusClientServerTestBase {
-    
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+
     private static boolean serversStarted;
     private static final String CONFIG_FILE =
         "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
@@ -75,7 +76,7 @@ public class HelloWorldContinuationsThro
         QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
         
         URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test2.wsdl");
-        
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlURL.toString());
         HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
         assertNotNull(service);
         final HelloContinuation helloPort = service.getHelloContinuationPort();

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -33,8 +33,10 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class JMSContinuationsClientServerTest extends AbstractBusClientServerTestBase {
-    
     protected static boolean serversStarted;
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = Server.PORT;
+
 
     @Before
     public void startServers() throws Exception {
@@ -74,6 +76,8 @@ public class JMSContinuationsClientServe
         QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
         URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
         assertNotNull(wsdl);
+        
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdl.toString());
 
         HelloWorldService service = new HelloWorldService(wsdl, serviceName);
         assertNotNull(service);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java Fri Jun  4 20:13:17 2010
@@ -20,14 +20,20 @@ package org.apache.cxf.systest.jms.conti
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
 public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
 
 
     protected void run()  {
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+            "testutils/jms_test.wsdl");
+
         Object implementor = new GreeterImplWithContinuationsJMS();        
-        String address = "http://localhost:9000/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java Fri Jun  4 20:13:17 2010
@@ -20,14 +20,19 @@ package org.apache.cxf.systest.jms.conti
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
 public class Server2 extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server2.class);
 
    
     protected void run()  {
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+                                                      "org/apache/cxf/systest/jms/continuations/test.wsdl");
         Object implementor = new HelloWorldWithContinuationsJMS();        
-        String address = "http://localhost:9000/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java Fri Jun  4 20:13:17 2010
@@ -24,8 +24,10 @@ import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
 public class Server3 extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server3.class);
 
     private static final String CONFIG_FILE =
         "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
@@ -34,8 +36,10 @@ public class Server3 extends AbstractBus
         SpringBusFactory bf = new SpringBusFactory();
         Bus bus = bf.createBus(CONFIG_FILE);
         BusFactory.setDefaultBus(bus);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, 
+                                                      "org/apache/cxf/systest/jms/continuations/test2.wsdl");
         Object implementor = new HelloWorldWithContinuationsJMS2();        
-        String address = "http://localhost:9000/SoapContext/SoapPort";
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
     }
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml Fri Jun  4 20:13:17 2010
@@ -28,19 +28,20 @@
 http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
     
     <jms:conduit name="{http://cxf.apache.org/systest/jaxws}HelloContinuationPort.jms-conduit">
       <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
       <jms:address jndiConnectionFactoryName="ConnectionFactory" 
                    jndiDestinationName="dynamicQueues/test.jmstransport.text">
                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
                </jms:address>
       <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
     </jms:conduit>
     
    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
-  	p:brokerURL="tcp://localhost:61500"/>
+  	p:brokerURL="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
   
   <bean id="singleConnectionFactory"
     class="org.springframework.jms.connection.SingleConnectionFactory" destroy-method="destroy">
@@ -56,7 +57,7 @@ http://www.springframework.org/schema/be
       <jms:address jndiConnectionFactoryName="ConnectionFactory" 
                    jndiDestinationName="dynamicQueues/test.jmstransport.text">
                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
                </jms:address>
       <jms:jmsConfig-ref>jmsConf2</jms:jmsConfig-ref>  
   </jms:destination>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -38,8 +38,9 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class JMSTransactionClientServerTest extends AbstractBusClientServerTestBase {
-    
     protected static boolean serversStarted;
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+
 
     @Before
     public void startServers() throws Exception {
@@ -78,7 +79,8 @@ public class JMSTransactionClientServerT
         QName portName = getPortName(new QName("http://apache.org/hello_world_doc_lit", "SoapPort2"));
         URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl");
         assertNotNull(wsdl);
-
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdl.toString());
+        
         SOAPService2 service = new SOAPService2(wsdl, serviceName);
         assertNotNull(service);
 
@@ -93,7 +95,7 @@ public class JMSTransactionClientServerT
 
         JMSConfiguration jmsConfig = new JMSConfiguration();
         ConnectionFactory connectionFactory
-            = new org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:61500");
+            = new org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:" + JMS_PORT);
         jmsConfig.setConnectionFactory(connectionFactory);
         jmsConfig.setTargetDestination("greeter.queue.noaop");
         jmsConfig.setPubSubDomain(false);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml Fri Jun  4 20:13:17 2010
@@ -34,6 +34,8 @@ http://cxf.apache.org/jaxws http://cxf.a
  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> 
  <import resource="classpath:META-INF/cxf/cxf-extension-jms.xml" />
  
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+ 
  <jaxws:endpoint implementor="#transactionalImplementor" 
  	implementorClass="org.apache.hello_world_doc_lit.Greeter"
  	wsdlLocation="testutils/hello_world_doc_lit.wsdl"
@@ -47,7 +49,7 @@ http://cxf.apache.org/jaxws http://cxf.a
     
   
   <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
-  	p:brokerURL="tcp://localhost:61500"
+  	p:brokerURL="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"
   />
   
   <bean id="singleConnectionFactory"

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -41,6 +41,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class MultiTransportClientServerTest extends AbstractBusClientServerTestBase {
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = allocatePort(MyServer.class);
     static final Logger LOG = LogUtils.getLogger(MultiTransportClientServerTest.class);
     private final QName serviceName = new QName(
                                       "http://apache.org/hello_world_doc_lit",
@@ -50,8 +52,9 @@ public class MultiTransportClientServerT
 
         protected void run() {
             Object implementor = new HTTPGreeterImpl();
-            String address = "http://localhost:9001/SOAPDocLitService/SoapPort";
+            String address = "http://localhost:" + PORT + "/SOAPDocLitService/SoapPort";
             Endpoint.publish(address, implementor);
+            EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), "testutils/hello_world_doc_lit.wsdl");
             implementor = new JMSGreeterImpl();
             Endpoint.publish(null, implementor);
         }
@@ -94,6 +97,7 @@ public class MultiTransportClientServerT
         QName portName2 = new QName("http://apache.org/hello_world_doc_lit", "JMSPort");
         URL wsdl = getClass().getResource("/wsdl/hello_world_doc_lit.wsdl");
         assertNotNull(wsdl);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdl.toString());
 
         MultiTransportService service = new MultiTransportService(wsdl, serviceName);
         assertNotNull(service);
@@ -102,6 +106,7 @@ public class MultiTransportClientServerT
         String response2 = new String("Bonjour");
         try {
             Greeter greeter = service.getPort(portName1, Greeter.class);
+            updateAddressPort(greeter, PORT);
             for (int idx = 0; idx < 5; idx++) {
                 String greeting = greeter.greetMe("Milestone-" + idx);
                 assertNotNull("no response received from service", greeting);

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/HttpNumberFactoryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/HttpNumberFactoryImpl.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/HttpNumberFactoryImpl.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/HttpNumberFactoryImpl.java Fri Jun  4 20:13:17 2010
@@ -63,7 +63,7 @@ public class HttpNumberFactoryImpl exten
         EndpointImpl ep = 
             new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation);
         ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort"));
-        ep.publish();
+        ep.publish(NUMBER_SERVANT_ADDRESS_ROOT);
         templateEpr = ep.getServer().getDestination().getAddress();        
     }
 }

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualHttpMulitplexClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -47,6 +47,7 @@ import org.junit.Test;
 
 
 public class ManualHttpMulitplexClientServerTest extends AbstractBusClientServerTestBase {
+    static final String FACTORY_ADDRESS = NumberFactoryImpl.FACTORY_ADDRESS;
     
     public static class Server extends AbstractBusTestServerBase {        
 
@@ -80,6 +81,7 @@ public class ManualHttpMulitplexClientSe
     
         NumberFactoryService service = new NumberFactoryService();
         NumberFactory nfact = service.getNumberFactoryPort();
+        updateAddressPort(nfact, NumberFactoryImpl.PORT);
         
         W3CEndpointReference w3cEpr = nfact.create("2");        
         assertNotNull("reference", w3cEpr);
@@ -121,7 +123,8 @@ public class ManualHttpMulitplexClientSe
         
         NumberFactoryService service = new NumberFactoryService();
         NumberFactory factory = service.getNumberFactoryPort();
-         
+        updateAddressPort(factory, NumberFactoryImpl.PORT);
+
         
         W3CEndpointReference w3cEpr = factory.create("20");
         EndpointReferenceType numberTwoRef = VersionTransformer.convertToInternal(w3cEpr); 

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualNumberFactoryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualNumberFactoryImpl.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualNumberFactoryImpl.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/ManualNumberFactoryImpl.java Fri Jun  4 20:13:17 2010
@@ -53,7 +53,7 @@ public class ManualNumberFactoryImpl ext
         EndpointImpl ep = 
             new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation);
         ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort"));
-        ep.publish();
+        ep.publish(NUMBER_SERVANT_ADDRESS_ROOT);
         templateEpr = ep.getServer().getDestination().getAddress();
     }
 }

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -26,6 +26,7 @@ import java.util.Map;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.factory_pattern.Number;
 import org.apache.cxf.factory_pattern.NumberFactory;
 import org.apache.cxf.factory_pattern.NumberFactoryService;
@@ -42,6 +43,8 @@ import org.junit.Test;
 
 
 public class MultiplexClientServerTest extends AbstractBusClientServerTestBase {
+    static final String PORT = NumberFactoryImpl.PORT;
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
     
     public static class Server extends AbstractBusTestServerBase {        
 
@@ -74,11 +77,11 @@ public class MultiplexClientServerTest e
         props.put("java.util.logging.config.file", 
                   System.getProperty("java.util.logging.config.file"));
         assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null, true));
         
         props.put("cxf.config.file", defaultConfigFileName);
         assertTrue("server did not launch correctly",
-                   launchServer(Server.class, props, null));
+                   launchServer(Server.class, props, null, true));
     }
 
     
@@ -87,6 +90,7 @@ public class MultiplexClientServerTest e
         
         NumberFactoryService service = new NumberFactoryService();
         NumberFactory factory = service.getNumberFactoryPort();
+        updateAddressPort(factory, PORT);
         
         NumberService numService = new NumberService();
         ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
@@ -107,13 +111,17 @@ public class MultiplexClientServerTest e
         
         NumberFactoryService service = new NumberFactoryService();
         NumberFactory factory = service.getNumberFactoryPort();
+        updateAddressPort(factory, PORT);
         
-        NumberService numService = new NumberService();
 
         // use values >= 30 to create JMS eprs - see NumberFactoryImpl.create
         
         // verify it is JMS, 999 for JMS will throw a fault
         W3CEndpointReference ref = factory.create("999");
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+                                                      NumberService.WSDL_LOCATION.toString());        
+        NumberService numService = new NumberService();
+
         assertNotNull("reference", ref);
         ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);    
         Number num =  (Number)serviceImpl.getPort(ref, Number.class); 

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/MultiplexHttpAddressClientServerTest.java Fri Jun  4 20:13:17 2010
@@ -51,6 +51,7 @@ import org.junit.Test;
  * exercise with multiplexWithAddress config rather than ws-a headers
  */
 public class MultiplexHttpAddressClientServerTest extends AbstractBusClientServerTestBase {
+    static final String FACTORY_ADDRESS = NumberFactoryImpl.FACTORY_ADDRESS;
     
     public static class Server extends AbstractBusTestServerBase {        
 
@@ -87,6 +88,7 @@ public class MultiplexHttpAddressClientS
         
         NumberFactoryService service = new NumberFactoryService();
         NumberFactory factory = service.getNumberFactoryPort();
+        updateAddressPort(factory, NumberFactoryImpl.PORT);
         
         NumberService numService = new NumberService();
         ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/NumberFactoryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/NumberFactoryImpl.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/NumberFactoryImpl.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/factory_pattern/NumberFactoryImpl.java Fri Jun  4 20:13:17 2010
@@ -29,6 +29,8 @@ import org.apache.cxf.factory_pattern.Nu
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 
@@ -37,11 +39,13 @@ import org.apache.cxf.wsdl.EndpointRefer
             endpointInterface = "org.apache.cxf.factory_pattern.NumberFactory", 
             targetNamespace = "http://cxf.apache.org/factory_pattern")
 public class NumberFactoryImpl implements NumberFactory {
-
+    public static final String PORT = TestUtil.getPortNumber(NumberFactoryImpl.class);
+    
+    
     public static final String FACTORY_ADDRESS = 
-        "http://localhost:9006/NumberFactoryService/NumberFactoryPort";
+        "http://localhost:" + PORT + "/NumberFactoryService/NumberFactoryPort";
     public static final String NUMBER_SERVANT_ADDRESS_ROOT = 
-        "http://localhost:9006/NumberService/NumberPort/";
+        "http://localhost:" + PORT + "/NumberService/NumberPort/";
     public static final String FACTORY_NS = "http://cxf.apache.org/factory_pattern";
     public static final String NUMBER_SERVICE_NAME = "NumberService";
     public static final String NUMBER_PORT_NAME = "NumberPort";
@@ -90,14 +94,16 @@ public class NumberFactoryImpl implement
         EndpointImpl ep = new EndpointImpl(BusFactory.getDefaultBus(), 
                                            servant, bindingId, wsdlLocation);
         ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPort"));
-        ep.publish();
+        ep.publish(NUMBER_SERVANT_ADDRESS_ROOT);
         templateEpr = ep.getServer().getDestination().getAddress();
 
         // jms port
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(), wsdlLocation);        
         ep = new EndpointImpl(BusFactory.getDefaultBus(), servant, bindingId, wsdlLocation);
         ep.setEndpointName(new QName(NUMBER_SERVICE_QNAME.getNamespaceURI(), "NumberPortJMS"));
         ep.publish();
         ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
         ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
     }
+    
 }

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/Server.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/Server.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/Server.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java Fri Jun  4 20:13:17 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/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java?rev=951551&r1=951550&r2=951551&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java Fri Jun  4 20:13:17 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,



Mime
View raw message