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

svn commit: r911188 - in /cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/ systests/ws-specs/ systests/ws-spe...

Author: dkulp
Date: Wed Feb 17 22:03:32 2010
New Revision: 911188

URL: http://svn.apache.org/viewvc?rev=911188&view=rev
Log:
[CXF-183] Start working on getting ws-a + JMS working by making sure the
non-decoupled case works fine

Added:
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java   (contents, props changed)
      - copied, changed from r911138, cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java   (with props)
Removed:
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java
Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/JMSSpecConstants.java
    cxf/trunk/systests/ws-specs/pom.xml
    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/NonDecoupledTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java Wed Feb 17 22:03:32 2010
@@ -145,7 +145,12 @@
 
         info.setName(config.getBindingName(si));
         info.setStyle(config.getStyle());
-        info.setTransportURI(config.getTransportURI());
+        if ("http://cxf.apache.org/transports/jms".equals(config.getTransportURI())) {
+            info.setTransportURI("http://www.w3.org/2008/07/soap/bindings/JMS/");
+            config.setTransportURI("http://www.w3.org/2008/07/soap/bindings/JMS/");
+        } else {
+            info.setTransportURI(config.getTransportURI());
+        }
 
         if (config.isMtomEnabled()) {
             info.setProperty(Message.MTOM_ENABLED, Boolean.TRUE);

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java Wed Feb 17 22:03:32 2010
@@ -91,6 +91,9 @@
         }
         return s;
     }
+    private boolean isJMSSpecAddress(String address) {
+        return address != null && address.startsWith("jms:") && !"jms://".equals(address);
+    }
 
     public Destination getDestination(EndpointInfo ei) throws IOException {
         String address = ei.getAddress();
@@ -105,6 +108,9 @@
                 transId = ei.getTransportId();
             }
         }
+        if (isJMSSpecAddress(address)) {
+            ei.setTransportId("http://www.w3.org/2008/07/soap/bindings/JMS/");
+        }
         DestinationFactory destinationFactory;
         try {
             DestinationFactoryManager mgr = bus.getExtension(DestinationFactoryManager.class);
@@ -169,6 +175,9 @@
     
                     info.addExtensor(sa);
                     info.setAddress(sa.getLocationURI());
+                    if (isJMSSpecAddress(sa.getLocationURI())) {
+                        info.setTransportId("http://www.w3.org/2008/07/soap/bindings/JMS/");
+                    }
                 } else {
                     info.addExtensor(extensor);
                 }
@@ -196,6 +205,9 @@
                 transId = ei.getTransportId();
             }
         }
+        if (isJMSSpecAddress(address)) {
+            ei.setTransportId("http://www.w3.org/2008/07/soap/bindings/JMS/");
+        }
         ConduitInitiator conduitInit;
         try {
             ConduitInitiatorManager mgr = bus.getExtension(ConduitInitiatorManager.class);

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsServerFactoryBean.java Wed Feb 17 22:03:32 2010
@@ -153,11 +153,6 @@
 
             if (transportId != null) {
                 conf.setTransportURI(transportId);
-            } else if (getAddress() != null 
-                && !getAddress().startsWith("http")
-                && !getAddress().startsWith("/")) {
-                // need to try and detect an id
-                transportId = detectTransportIdFromAddress(getAddress());
             }
             conf.setJaxWsServiceFactoryBean(sf);
             

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java Wed Feb 17 22:03:32 2010
@@ -397,6 +397,11 @@
         proxyFac.setBus(bus);
         proxyFac.setServiceClass(serviceEndpointInterface);
         proxyFac.setServiceName(serviceName);
+        if (epr != null 
+            && epr.getAddress() != null 
+            && epr.getAddress().getValue() != null) {
+            clientFac.setAddress(epr.getAddress().getValue());
+        }
 
         if (wsdlURL != null) {
             proxyFac.setWsdlURL(wsdlURL);

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/JMSSpecConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/JMSSpecConstants.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/JMSSpecConstants.java (original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/JMSSpecConstants.java Wed Feb 17 22:03:32 2010
@@ -25,8 +25,8 @@
  */
 public final class JMSSpecConstants {
 
-    public static final String SOAP_JMS_SPECIFICIATION_TRANSPORTID = "http://www.w3.org/2008/07/"
-                                                                     + "soap/bindings/JMS/";
+    public static final String SOAP_JMS_SPECIFICIATION_TRANSPORTID 
+        = "http://www.w3.org/2008/07/soap/bindings/JMS/";
     public static final String SOAP_JMS_NAMESPACE = SOAP_JMS_SPECIFICIATION_TRANSPORTID;
 
     public static final String SOAP_JMS_PREFIX = "SOAPJMS_";

Modified: cxf/trunk/systests/ws-specs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/pom.xml?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/pom.xml (original)
+++ cxf/trunk/systests/ws-specs/pom.xml Wed Feb 17 22:03:32 2010
@@ -122,6 +122,17 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-jms</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-transports-http-jetty</artifactId>
             <version>${project.version}</version>
         </dependency>

Copied: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java (from r911138, cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java?p2=cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java&p1=cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java&r1=911138&r2=911188&rev=911188&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/GreeterImpl.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java Wed Feb 17 22:03:32 2010
@@ -23,7 +23,6 @@
 import java.util.concurrent.Future;
 
 import javax.annotation.Resource;
-import javax.jws.WebService;
 import javax.xml.ws.AsyncHandler;
 import javax.xml.ws.Response;
 import javax.xml.ws.WebServiceContext;
@@ -44,21 +43,19 @@
 
 import static org.apache.cxf.ws.addressing.JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND;
 
-
-@WebService(serviceName = "SOAPServiceAddressing", 
-            portName = "SoapPort", 
-            endpointInterface = "org.apache.hello_world_soap_http.Greeter", 
-            targetNamespace = "http://apache.org/hello_world_soap_http",
-            wsdlLocation = "testutils/hello_world.wsdl")
-public class GreeterImpl implements Greeter {
+public abstract class AbstractGreeterImpl implements Greeter {
     VerificationCache verificationCache;
-
+    
     /**
      * Injectable context.
      */
     @Resource
     private WebServiceContext context;
 
+    
+    public AbstractGreeterImpl() {
+    }
+
 
     public String greetMe(String me) {
         System.out.println("\n\n*** GreetMe called with: " + me + "***\n\n");

Propchange: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/AbstractGreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java Wed Feb 17 22:03:32 2010
@@ -20,7 +20,12 @@
 package org.apache.cxf.systest.ws.addressing;
 
 import java.lang.reflect.UndeclaredThrowableException;
+
+import javax.jws.WebService;
+
 import org.apache.hello_world_soap_http.BadRecordLitFault;
+
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 
@@ -28,6 +33,7 @@
  * Tests the addition of WS-Addressing Message Addressing Properties.
  */
 public class MAPTest extends MAPTestBase {
+    static final String ADDRESS = "http://localhost:9008/SoapContext/SoapPort";
 
     private static final String CONFIG;
     static {
@@ -40,7 +46,29 @@
     public String getConfigFileName() {
         return CONFIG;
     }
+    public String getAddress() {
+        return ADDRESS;
+    }
     
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        // special case handling for WS-Addressing system test to avoid
+        // UUID related issue when server is run as separate process
+        // via maven on Win2k
+        boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server.class, null,
+                                new String[] {ADDRESS, GreeterImpl.class.getName()},  inProcess));
+    }
+    @WebService(serviceName = "SOAPServiceAddressing", 
+                portName = "SoapPort", 
+                endpointInterface = "org.apache.hello_world_soap_http.Greeter", 
+                targetNamespace = "http://apache.org/hello_world_soap_http",
+                wsdlLocation = "testutils/hello_world.wsdl")
+    public static class GreeterImpl extends org.apache.cxf.systest.ws.addressing.AbstractGreeterImpl {
+        
+    }
     
     @Test
     public void testUsingKeepAliveConnection() throws Exception {

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java Wed Feb 17 22:03:32 2010
@@ -55,8 +55,6 @@
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.apache.cxf.ws.addressing.JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES;
@@ -81,25 +79,13 @@
 
     private static final QName SERVICE_NAME = 
         new QName("http://apache.org/hello_world_soap_http", "SOAPServiceAddressing");
-    private static final String NOWHERE = "http://nowhere.nada.nothing.nought:5555";
-    private static final String DECOUPLED = "http://localhost:9999/decoupled_endpoint";
     
     private static Map<Object, Map<String, String>> messageIDs =
         new HashMap<Object, Map<String, String>>();
     protected Greeter greeter;
     private String verified;
     
-    
 
-    @BeforeClass
-    public static void startServers() throws Exception {
-        // special case handling for WS-Addressing system test to avoid
-        // UUID related issue when server is run as separate process
-        // via maven on Win2k
-        boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
-        assertTrue("server did not launch correctly", 
-                   launchServer(Server.class, inProcess));
-    }
     
     @AfterClass
     public static void shutdownBus() throws Exception {
@@ -120,6 +106,7 @@
     }
     
     public abstract String getConfigFileName();
+    public abstract String getAddress();
     
     @Before
     public void setUp() throws Exception {
@@ -141,21 +128,25 @@
         addInterceptors(staticBus.getInFaultInterceptors(), interceptors);
         
         EndpointReferenceType target = 
-            EndpointReferenceUtils.getEndpointReference(Server.ADDRESS);
+            EndpointReferenceUtils.getEndpointReference(getAddress());
         ReferenceParametersType params = 
             ContextUtils.WSA_OBJECT_FACTORY.createReferenceParametersType();
         JAXBElement<String> param =
              new JAXBElement<String>(CUSTOMER_NAME, String.class, CUSTOMER_KEY);
         params.getAny().add(param);
         target.setReferenceParameters(params);
-        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
-        ServiceImpl serviceImpl = 
-            ServiceDelegateAccessor.get(new SOAPService(wsdl, SERVICE_NAME));
-        greeter = serviceImpl.getPort(target, Greeter.class);
-
+        greeter = createGreeter(target);
         mapVerifier.verificationCache = this;
         headerVerifier.verificationCache = this;
     }
+    public URL getWSDLURL() {
+        return getClass().getResource("/wsdl/hello_world.wsdl");
+    }
+    public Greeter createGreeter(EndpointReferenceType target) {
+        ServiceImpl serviceImpl = 
+            ServiceDelegateAccessor.get(new SOAPService(getWSDLURL(), SERVICE_NAME));
+        return serviceImpl.getPort(target, Greeter.class);        
+    }
     
     @After
     public void tearDown() throws Exception {
@@ -191,7 +182,8 @@
     }
 
     @Test
-    @Ignore("randomly fails quite often, but not in the debugger so not sure what is going on yet")
+    //@org.junit.Ignore("randomly fails quite often, but not in the "
+    //                    + " debugger so not sure what is going on yet")
     public void testExplicitMAPs() throws Exception {
         try {
             String msgId = "urn:uuid:12345-" + Math.random();
@@ -233,7 +225,6 @@
     }
     
     @Test
-    @Ignore
     public void testFaultTo() throws Exception {
         try {
             String greeting = greeter.greetMe("warmup");
@@ -241,20 +232,11 @@
                          "Hello warmup",
                          greeting);
             checkVerification();
-
-            Map<String, Object> requestContext = 
-                ((BindingProvider)greeter).getRequestContext();
-            AddressingProperties maps = new AddressingPropertiesImpl();
-            maps.setReplyTo(EndpointReferenceUtils.getEndpointReference(NOWHERE));
-            maps.setFaultTo(EndpointReferenceUtils.getEndpointReference(DECOUPLED));
-            requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps);
             try {
                 greeter.testDocLitFault("BadRecordLitFault");
                 fail("expected fault from service");
             } catch (BadRecordLitFault brlf) {
                 checkVerification();
-            } catch (UndeclaredThrowableException ex) {
-                throw (Exception)ex.getCause();
             }
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
@@ -273,7 +255,7 @@
     
     
     @Test
-    @Ignore("Random failure on Linux")
+    //@org.junit.Ignore("Random failure on Linux")
     public void testApplicationFault() throws Exception {
         try {
             greeter.testDocLitFault("BadRecordLitFault");

Added: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java?rev=911188&view=auto
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java (added)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java Wed Feb 17 22:03:32 2010
@@ -0,0 +1,90 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.addressing;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * Tests the addition of WS-Addressing Message Addressing Properties
+ * in the non-decoupled case.
+ */
+public class NonDecoupledJMSTest extends MAPTestBase {
+    private static final String ADDRESS = "jms:jndi:dynamicQueues/testqueue0001?"
+        + "jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+        + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
+    
+    
+    private static final String CONFIG =
+        "org/apache/cxf/systest/ws/addressing/wsa_interceptors.xml";
+
+    public String getConfigFileName() {
+        return CONFIG;
+    }
+    
+    @Test
+    @Override
+    public void testImplicitMAPs() throws Exception {
+        super.testImplicitMAPs();
+    }
+    
+    public String getAddress() {
+        return ADDRESS;
+    }
+    
+    public URL getWSDLURL() {
+        return null;
+    }
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        
+        Map<String, String> props = new HashMap<String, String>();
+        if (System.getProperty("activemq.store.dir") != null) {
+            props.put("activemq.store.dir", System.getProperty("activemq.store.dir"));
+        }
+        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));
+
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server.class, null, 
+                                new String[] {ADDRESS, GreeterImpl.class.getName()}, false));
+    }
+    
+    @WebService(serviceName = "SOAPServiceAddressing", 
+                portName = "SoapPort", 
+                endpointInterface = "org.apache.hello_world_soap_http.Greeter", 
+                targetNamespace = "http://apache.org/hello_world_soap_http")
+    public static class GreeterImpl extends org.apache.cxf.systest.ws.addressing.AbstractGreeterImpl {
+        
+    }
+}
+

Propchange: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledJMSTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java Wed Feb 17 22:03:32 2010
@@ -19,6 +19,9 @@
 
 package org.apache.cxf.systest.ws.addressing;
 
+import javax.jws.WebService;
+
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 
@@ -27,6 +30,7 @@
  * in the non-decoupled case.
  */
 public class NonDecoupledTest extends MAPTestBase {
+    static final String ADDRESS = "http://localhost:9008/SoapContext/SoapPort";
 
     private static final String CONFIG =
         "org/apache/cxf/systest/ws/addressing/wsa_interceptors.xml";
@@ -35,9 +39,34 @@
         return CONFIG;
     }
     
+    @BeforeClass
+    public static void startServers() throws Exception {
+        // special case handling for WS-Addressing system test to avoid
+        // UUID related issue when server is run as separate process
+        // via maven on Win2k
+        boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server.class, null, 
+                                new String[] {ADDRESS, GreeterImpl.class.getName()}, inProcess));
+    }
+    
+    @WebService(serviceName = "SOAPServiceAddressing", 
+                portName = "SoapPort", 
+                endpointInterface = "org.apache.hello_world_soap_http.Greeter", 
+                targetNamespace = "http://apache.org/hello_world_soap_http",
+                wsdlLocation = "testutils/hello_world.wsdl")
+    public static class GreeterImpl extends org.apache.cxf.systest.ws.addressing.AbstractGreeterImpl {
+        
+    }
+    public String getAddress() {
+        return ADDRESS;
+    }
+
+    
     @Test
     public void foo() {
         
     }
+    
 }
 

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java?rev=911188&r1=911187&r2=911188&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java Wed Feb 17 22:03:32 2010
@@ -34,12 +34,17 @@
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase implements VerificationCache {
-    static final String ADDRESS = "http://localhost:9008/SoapContext/SoapPort";
 
     private String verified;
+    private String address;
+    private Class<?> cls;
  
-    protected void run()  {
-
+    public Server(String[] args) throws Exception {
+        address = args[0];
+        cls = Class.forName(args[1]);
+    }
+    
+    protected void run() {
         SpringBusFactory factory = new SpringBusFactory();
         Bus bus = factory.createBus("org/apache/cxf/systest/ws/addressing/server.xml");
         BusFactory.setDefaultBus(bus);
@@ -47,9 +52,13 @@
 
         addVerifiers();
 
-        GreeterImpl implementor = new GreeterImpl();
-        implementor.verificationCache = this;
-        Endpoint.publish(ADDRESS, implementor);
+        try {
+            AbstractGreeterImpl implementor = (AbstractGreeterImpl)cls.newInstance();
+            implementor.verificationCache = this;
+            Endpoint.publish(address, implementor);
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
     }
 
     protected void addVerifiers() {
@@ -74,7 +83,7 @@
         
     public static void main(String[] args) {
         try { 
-            Server s = new Server(); 
+            Server s = new Server(args); 
             s.start();
         } catch (Exception ex) {
             ex.printStackTrace();