[jbossws-commits] JBossWS SVN: r2801 - in branches/dlofthouse/JBWS-1607/jbossws-tests/src: resources/tools/jbws1607 and 1 other directory.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Apr 11 12:31:45 EDT 2007
Author: darran.lofthouse at jboss.com
Date: 2007-04-11 12:31:45 -0400 (Wed, 11 Apr 2007)
New Revision: 2801
Added:
branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/PhoneBook_PortType.java
branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/jaxrpc-mapping.xml
Modified:
branches/dlofthouse/JBWS-1607/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1607/JBWS1607TestCase.java
Log:
Completed test case.
Modified: branches/dlofthouse/JBWS-1607/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1607/JBWS1607TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1607/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1607/JBWS1607TestCase.java 2007-04-11 15:45:49 UTC (rev 2800)
+++ branches/dlofthouse/JBWS-1607/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1607/JBWS1607TestCase.java 2007-04-11 16:31:45 UTC (rev 2801)
@@ -21,7 +21,12 @@
*/
package org.jboss.test.ws.tools.jbws1607;
-import org.jboss.test.ws.tools.WSToolsTest;
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
import org.jboss.ws.tools.WSTools;
/**
@@ -34,7 +39,7 @@
* @author darran.lofthouse at jboss.com
* @since 11 Apr 2007
*/
-public class JBWS1607TestCase extends WSToolsTest
+public class JBWS1607TestCase extends JBossWSTest
{
/**
@@ -48,5 +53,55 @@
String toolsDir = "tools/jbws1607";
String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
new WSTools().generate(args);
+
+ File resourceDirFile = new File(resourceDir);
+ String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
+ public boolean accept(File dir, String name)
+ {
+ return name.endsWith(".java");
+ }
+ });
+
+ for (int i = 0; i < expectedFiles.length; i++)
+ {
+ String currentFile = expectedFiles[i];
+
+ try
+ {
+ compareSource(resourceDir + "/" + currentFile, toolsDir + "/org/jboss/test/ws/jbws1607/" + currentFile);
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Validation of '" + currentFile + "' failed.", e);
+ }
+ }
+
+ File packageDir = new File(toolsDir + "/org/jboss/test/ws/jbws1607");
+ String[] generatedFiles = packageDir.list();
+ for (int i = 0; i < generatedFiles.length; i++)
+ {
+ String currentFile = generatedFiles[i];
+
+ boolean matched = "PhoneBookService.java".equals(currentFile);
+
+ for (int j = 0; j < expectedFiles.length && (matched == false); j++)
+ matched = currentFile.equals(expectedFiles[j]);
+
+ assertTrue("File '" + currentFile + "' was not expected to be generated", matched);
+ }
+
+ JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
+ mappingValidator.validate(resourceDir + "/jaxrpc-mapping.xml", toolsDir + "/jaxrpc-mapping.xml");
+
}
+
+ private static void compareSource(final String expectedName, final String generatedName) throws Exception
+ {
+ File expected = new File(expectedName);
+ File generated = new File(generatedName);
+
+ JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
+ sc.validate();
+ sc.validateImports();
+ }
}
Added: branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/PhoneBook_PortType.java
===================================================================
--- branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/PhoneBook_PortType.java (rev 0)
+++ branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/PhoneBook_PortType.java 2007-04-11 16:31:45 UTC (rev 2801)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Wed Apr 11 17:06:28 CEST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jbws1607;
+public interface PhoneBook_PortType extends java.rmi.Remote
+{
+
+ public void lookup(javax.xml.rpc.holders.StringHolder lookup) throws java.rmi.RemoteException;
+}
Property changes on: branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/PhoneBook_PortType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/jaxrpc-mapping.xml
===================================================================
--- branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/jaxrpc-mapping.xml (rev 0)
+++ branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/jaxrpc-mapping.xml 2007-04-11 16:31:45 UTC (rev 2801)
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <package-type xmlns='http://java.sun.com/xml/ns/j2ee'>org.jboss.test.ws.jbws1607</package-type>
+ <namespaceURI xmlns='http://java.sun.com/xml/ns/j2ee'>http://test.jboss.org/ws/jbws1607</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <service-interface xmlns='http://java.sun.com/xml/ns/j2ee'>org.jboss.test.ws.jbws1607.PhoneBook_Service</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://test.jboss.org/ws/jbws1607' xmlns='http://java.sun.com/xml/ns/j2ee'>serviceNS:PhoneBook</wsdl-service-name>
+ <port-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <port-name xmlns='http://java.sun.com/xml/ns/j2ee'>PhoneBookPort</port-name>
+ <java-port-name xmlns='http://java.sun.com/xml/ns/j2ee'>PhoneBookPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <service-endpoint-interface xmlns='http://java.sun.com/xml/ns/j2ee'>org.jboss.test.ws.jbws1607.PhoneBook_PortType</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://test.jboss.org/ws/jbws1607' xmlns='http://java.sun.com/xml/ns/j2ee'>portTypeNS:PhoneBook</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://test.jboss.org/ws/jbws1607' xmlns='http://java.sun.com/xml/ns/j2ee'>bindingNS:PhoneBookBinding</wsdl-binding>
+ <service-endpoint-method-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <java-method-name xmlns='http://java.sun.com/xml/ns/j2ee'>lookup</java-method-name>
+ <wsdl-operation xmlns='http://java.sun.com/xml/ns/j2ee'>lookup</wsdl-operation>
+ <method-param-parts-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <param-position xmlns='http://java.sun.com/xml/ns/j2ee'>0</param-position>
+ <param-type xmlns='http://java.sun.com/xml/ns/j2ee'>java.lang.String</param-type>
+ <wsdl-message-mapping xmlns='http://java.sun.com/xml/ns/j2ee'>
+ <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1607' xmlns='http://java.sun.com/xml/ns/j2ee'>wsdlMsgNS:PhoneBook_lookup</wsdl-message>
+ <wsdl-message-part-name xmlns='http://java.sun.com/xml/ns/j2ee'>lookup</wsdl-message-part-name>
+ <parameter-mode xmlns='http://java.sun.com/xml/ns/j2ee'>INOUT</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1607/jbossws-tests/src/resources/tools/jbws1607/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jbossws-commits
mailing list