[jbossws-commits] JBossWS SVN: r10847 - in stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint: jse and 1 other directory.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Oct 7 08:07:45 EDT 2009


Author: richard.opalka at jboss.com
Date: 2009-10-07 08:07:44 -0400 (Wed, 07 Oct 2009)
New Revision: 10847

Modified:
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
Log:
[JBWS-2674][JBWS-2754] removing useless tomcat hack + extending API coverage (WIP)

Modified: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java	2009-10-07 08:46:05 UTC (rev 10846)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java	2009-10-07 12:07:44 UTC (rev 10847)
@@ -22,7 +22,6 @@
 package org.jboss.test.ws.jaxws.endpoint;
 
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.InputStreamReader;
 import java.net.URL;
 
@@ -50,27 +49,10 @@
  */
 public class EndpointTestCase extends JBossWSTest
 {
+
    public static Test suite()
    {
-      return new TestSetup(new JBossWSTestSetup(EndpointTestCase.class, "jaxws-endpoint-servlet.war")) {
-
-         private Boolean useJBossWebLoader;
-         
-         protected void setUp() throws Exception
-         {
-            MBeanServerConnection server = JBossWSTestHelper.getServer();
-            useJBossWebLoader = (Boolean)server.getAttribute(new ObjectName("jboss.web:service=WebServer"), "UseJBossWebLoader");
-            server.setAttribute(new ObjectName("jboss.web:service=WebServer"), new Attribute("UseJBossWebLoader", Boolean.TRUE));
-            super.setUp();
-         }
-
-         protected void tearDown() throws Exception
-         {
-            super.tearDown();
-            MBeanServerConnection server = JBossWSTestHelper.getServer();
-            server.setAttribute(new ObjectName("jboss.web:service=WebServer"), new Attribute("UseJBossWebLoader", useJBossWebLoader));
-         }
-      };
+      return new TestSetup(new JBossWSTestSetup(EndpointTestCase.class, "jaxws-endpoint-servlet.war"));
    }
 
    public void testWSDLAccess() throws Exception
@@ -100,4 +82,5 @@
       BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
       assertEquals("hello-world", br.readLine());
    }
+
 }

Modified: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java	2009-10-07 08:46:05 UTC (rev 10846)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java	2009-10-07 12:07:44 UTC (rev 10847)
@@ -46,7 +46,7 @@
 import org.jboss.wsf.test.JBossWSTest;
 
 /**
- * TODO: javadoc
+ * Tests endpoint dynamic publishing in JSE environment.
  *
  * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
  */
@@ -73,10 +73,10 @@
    public void testTwoPorts() throws Exception
    {
       String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint1";
-      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+      Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
 
       String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint2";
-      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+      Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);
 
       invokeEndpoint1(publishURL1);
       invokeEndpoint1(publishURL2);
@@ -88,10 +88,10 @@
    public void testTwoPortsAndLongPaths() throws Exception
    {
       String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
-      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+      Endpoint endpoint1 = publishEndpoint3(Endpoint1Impl.class, publishURL1);
 
       String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/number2";
-      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+      Endpoint endpoint2 = publishEndpoint1(new Endpoint1Impl(), publishURL2);
 
       invokeEndpoint1(publishURL1);
       invokeEndpoint1(publishURL2);
@@ -103,10 +103,10 @@
    public void testTwoPortsAndAlmostIdenticalLongPaths() throws Exception
    {
       String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
-      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+      Endpoint endpoint1 = publishEndpoint2(Endpoint1Impl.class, publishURL1);
 
       String publishURL2 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number11";
-      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+      Endpoint endpoint2 = publishEndpoint3(new Endpoint1Impl(), publishURL2);
 
       invokeEndpoint2(publishURL1);
       invokeEndpoint2(publishURL2);
@@ -118,10 +118,10 @@
    public void testTwoPortsAndIdenticalPaths() throws Exception
    {
       String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
-      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+      Endpoint endpoint1 = publishEndpoint1(Endpoint1Impl.class, publishURL1);
 
       String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/number1";
-      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+      Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);
 
       invokeEndpoint2(publishURL1);
       invokeEndpoint2(publishURL2);
@@ -133,7 +133,7 @@
    public void testEndpointException() throws Exception
    {
       String publishURL = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
-      Endpoint endpoint = publishEndpoint(Endpoint1Impl.class, publishURL);
+      Endpoint endpoint = publishEndpoint3(Endpoint1Impl.class, publishURL);
       invokeEndpoint3(publishURL);
       endpoint.stop();
    }
@@ -143,19 +143,31 @@
       for (int i = 0; i < 2; i++)
       {
          String publishURL = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
-         Endpoint endpoint = publishEndpoint(Endpoint1Impl.class, publishURL);
+         Endpoint endpoint = publishEndpoint3(Endpoint1Impl.class, publishURL);
          invokeEndpoint4(publishURL);
          endpoint.stop();
       }
    }
 
-   private Endpoint publishEndpoint(Object epImpl, String publishURL)
+   private Endpoint publishEndpoint1(Object epImpl, String publishURL)
    {
       Endpoint endpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, epImpl);
       endpoint.publish(publishURL);
       return endpoint;
    }
+   
+   private Endpoint publishEndpoint2(Object epImpl, String publishURL)
+   {
+      Endpoint endpoint = Endpoint.create(epImpl);
+      endpoint.publish(publishURL);
+      return endpoint;
+   }
 
+   private Endpoint publishEndpoint3(Object epImpl, String publishURL)
+   {
+      return Endpoint.publish(publishURL, epImpl);
+   }
+
    private void invokeEndpoint1(String publishURL) throws Exception
    {
       Endpoint1Iface port = this.getProxy(publishURL);



More information about the jbossws-commits mailing list