[jbossws-commits] JBossWS SVN: r3678 - in branches/jbossws-2.0: jbossws-core/ant-import and 2 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Jun 21 11:21:14 EDT 2007


Author: david.boeren
Date: 2007-06-21 11:21:13 -0400 (Thu, 21 Jun 2007)
New Revision: 3678

Modified:
   branches/jbossws-2.0/build/ant-import/build-testsuite.xml
   branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
   branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml
   branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
Log:
Updating unit tests for JBWS-1665

Modified: branches/jbossws-2.0/build/ant-import/build-testsuite.xml
===================================================================
--- branches/jbossws-2.0/build/ant-import/build-testsuite.xml	2007-06-21 14:40:45 UTC (rev 3677)
+++ branches/jbossws-2.0/build/ant-import/build-testsuite.xml	2007-06-21 15:21:13 UTC (rev 3678)
@@ -151,6 +151,7 @@
       <pathelement location="${jboss.client}/stax-api.jar"/>
       <pathelement location="${jboss.client}/jbosssx-client.jar"/>
       <pathelement location="${jboss.server.lib}/servlet-api.jar"/>
+      <pathelement location="${jboss.client}/junit.jar"/>
     </path>
     <path id="tests.client.classpath">
       <pathelement location="${jboss.client}/commons-logging.jar"/>

Modified: branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml	2007-06-21 14:40:45 UTC (rev 3677)
+++ branches/jbossws-2.0/jbossws-core/ant-import/build-thirdparty.xml	2007-06-21 15:21:13 UTC (rev 3678)
@@ -133,6 +133,7 @@
         <pathelement location="${thirdparty.dir}/jboss-remoting.jar"/>
         <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
         <pathelement location="${thirdparty.dir}/jbosssx.jar"/>
+        <pathelement location="${thirdparty.dir}/junit.jar"/>
         <pathelement location="${thirdparty.dir}/mail.jar"/>
         <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
         <pathelement location="${thirdparty.dir}/stax-api.jar"/>

Modified: branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml	2007-06-21 14:40:45 UTC (rev 3677)
+++ branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml	2007-06-21 15:21:13 UTC (rev 3678)
@@ -160,6 +160,19 @@
       </fileset>
     </jar>
 
+    <!-- jaxws-jbws1665 -->
+    <jar jarfile="${tests.output.dir}/libs/jaxws-jbws1665.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/jbws1665/CoordinateData.class"/>
+        <include name="org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.class"/>
+        <include name="org/jboss/test/ws/jaxws/jbws1665/PropertyData.class"/>
+        <include name="org/jboss/test/ws/jaxws/jbws1665/TraceData.class"/>
+        <include name="org/jboss/test/ws/jaxws/jbws1665/TracePollData.class"/>
+        <include name="org/jboss/test/ws/jaxws/jbws1665/TrackingServiceBean.class"/>
+        <include name="org/jboss/test/ws/jaxws/jbws1665/TrackingServiceInterface.class"/>
+      </fileset>
+    </jar>
+
     <!-- jaxws-jbws981 -->
     <jar destfile="${tests.output.dir}/libs/jaxws-jbws981.jar">
       <fileset dir="${tests.output.dir}/classes">

Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java	2007-06-21 14:40:45 UTC (rev 3677)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java	2007-06-21 15:21:13 UTC (rev 3678)
@@ -23,13 +23,18 @@
 
 // $Id: $
 
+import java.io.File;
+import java.io.Writer;
 import java.net.MalformedURLException;
 import java.net.URL;
 
 import junit.framework.Test;
 
+import org.jboss.ws.Constants;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
 import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.wsf.spi.utils.IOUtils;
 import org.jboss.wsf.spi.test.JBossWSTest;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
 
@@ -40,36 +45,30 @@
  */
 public class JBWS1665TestCase extends JBossWSTest
 {
-   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1655/TrackingService";
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1655/TrackingServiceBean";
 
-//   public static Test suite()
-//   {
-//      return JBossWSTestSetup.newTestSetup(JBWS1665TestCase.class, "jaxws-jbws1665.jar");
-//   }
-
-   public void testWebService() throws Exception
+   public static Test suite()
    {
-      System.out.println("FIXME: [JBWS-1665] incorrect wsdl generation");
-      
-      //assertWSDLAccess();
-
-      // Need to validate the WSDL is property populated.  Several fields such as
-      // element names are being left blank.  This is related to case 16130.  The
-      // entire generated wsdl is attached to the case.
-
-      /*
-      QName serviceName = new QName("http://org.jboss.ws/jbws1665", "EJB3BeanService");
-      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
-      Service service = Service.create(wsdlURL, serviceName);
-      TrackingServiceInterface port = (TrackingServiceInterface)service.getPort(TrackingServiceInterface.class);
-      */
+      return JBossWSTestSetup.newTestSetup(JBWS1665TestCase.class, "jaxws-jbws1665.jar");
    }
 
-   private void assertWSDLAccess() throws MalformedURLException
+   public void testWebService() throws Exception
    {
       URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
       WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
       WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
       assertNotNull(wsdlDefinitions);
+
+      // This turns out to be unnecessary, as the invalid WSDL cannot be parsed
+      // by the WSDLDefinitionsFactory and has already failed.
+      /*
+      File wsdlDir = new File("./tools/jbws1665");
+      wsdlDir.mkdirs();
+      String wsdlPath = wsdlDir + "/" + "JBWS1665.wsdl";
+
+      Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
+      new WSDLWriter(wsdlDefinitions).write(fw, Constants.DEFAULT_XML_CHARSET);
+      fw.close();
+      */
    }
 }




More information about the jbossws-commits mailing list