[jbossws-commits] JBossWS SVN: r3565 - in branches/jbossws-2.0: testsuite and 2 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Jun 13 09:30:04 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-06-13 09:30:03 -0400 (Wed, 13 Jun 2007)
New Revision: 3565

Modified:
   branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml
   branches/jbossws-2.0/testsuite/.classpath
   branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
   branches/jbossws-2.0/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl
Log:
[JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation

Modified: branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml	2007-06-13 12:55:06 UTC (rev 3564)
+++ branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml	2007-06-13 13:30:03 UTC (rev 3565)
@@ -41,6 +41,8 @@
     <mkdir dir="${thirdparty.dir}"/>
     <get src="${jboss.repository}/apache-ant/${apache-ant}/lib/ant.jar" dest="${thirdparty.dir}/ant.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar" dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar" dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>

Modified: branches/jbossws-2.0/testsuite/.classpath
===================================================================
--- branches/jbossws-2.0/testsuite/.classpath	2007-06-13 12:55:06 UTC (rev 3564)
+++ branches/jbossws-2.0/testsuite/.classpath	2007-06-13 13:30:03 UTC (rev 3565)
@@ -14,5 +14,6 @@
 	<classpathentry kind="lib" path="/integration-spi/thirdparty/jaxb-api.jar"/>
 	<classpathentry kind="lib" path="/integration-spi/thirdparty/jaxb-impl.jar"/>
 	<classpathentry kind="lib" path="/integration-spi/thirdparty/stax-api.jar"/>
+	<classpathentry kind="lib" path="/integration-spi/thirdparty/wsdl4j.jar" sourcepath="/integration-spi/thirdparty/wsdl4j-src.jar"/>
 	<classpathentry kind="output" path="output/eclipse"/>
 </classpath>

Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java	2007-06-13 12:55:06 UTC (rev 3564)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java	2007-06-13 13:30:03 UTC (rev 3565)
@@ -23,6 +23,9 @@
 
 import java.net.URL;
 
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
@@ -54,10 +57,15 @@
       Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
       TestEndpoint port = service.getPort(TestEndpoint.class);
 
+      // [JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation
+      Definition wsdl = getWSDLDefinition(soapAddress + "?wsdl");
+      String nsURI = wsdl.getNamespace("jbws1616");
+      assertEquals("http://jira.jboss.org/jira/browse/JBWS-1616", nsURI);
+      
       // [JBWS-1655] Add support for endpoint address rewriting
       BindingProvider bp = (BindingProvider)port;
       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
-      
+
       String helloWorld = "Hello world!";
       String retObj = port.echo(helloWorld);
       assertEquals(helloWorld, retObj);
@@ -70,12 +78,26 @@
       Service service = Service.create(new URL(soapAddress + "?wsdl"), serviceName);
       TestEndpoint port = service.getPort(TestEndpoint.class);
 
+      // [JBWS-1616] Verify correct bahaviour of @WebService.wsdlLocation
+      Definition wsdl = getWSDLDefinition(soapAddress + "?wsdl");
+      String nsURI = wsdl.getNamespace("jbws1616");
+      assertEquals("http://jira.jboss.org/jira/browse/JBWS-1616", nsURI);
+      
       // [JBWS-1655] Add support for endpoint address rewriting
       BindingProvider bp = (BindingProvider)port;
       bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapAddress);
-      
+
       String helloWorld = "Hello world!";
       String retObj = port.echo(helloWorld);
       assertEquals(helloWorld, retObj);
    }
+
+   private Definition getWSDLDefinition(String wsdlLocation) throws Exception
+   {
+      WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+      WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+      Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
+      return definition;
+   }
 }

Modified: branches/jbossws-2.0/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- branches/jbossws-2.0/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl	2007-06-13 12:55:06 UTC (rev 3564)
+++ branches/jbossws-2.0/testsuite/src/resources/jaxws/samples/eardeployment/WEB-INF/wsdl/TestEndpoint.wsdl	2007-06-13 13:30:03 UTC (rev 3565)
@@ -8,6 +8,7 @@
 <definitions name="TestEndpointService" 
   targetNamespace="http://eardeployment.jaxws/" 
   xmlns="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:jbws1616="http://jira.jboss.org/jira/browse/JBWS-1616"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://eardeployment.jaxws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
   <!-- Test a schema import -->  




More information about the jbossws-commits mailing list