[jbossws-commits] JBossWS SVN: r3948 - in branches/jbossws-2.0/jbossws-core/src/test: java/org/jboss/test/ws/tools/jbws1725 and 2 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Jul 19 08:08:44 EDT 2007


Author: mageshbk at jboss.com
Date: 2007-07-19 08:08:44 -0400 (Thu, 19 Jul 2007)
New Revision: 3948

Added:
   branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1725/
   branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1725/JBWS1725TestCase.java
   branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/
   branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/Extension.wsdl
   branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/PasswordType.java
   branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/wstools-config.xml
Log:
[JBWS-1725] Added Testcase that compares the generated file

Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1725/JBWS1725TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1725/JBWS1725TestCase.java	                        (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1725/JBWS1725TestCase.java	2007-07-19 12:08:44 UTC (rev 3948)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.tools.jbws1725;
+
+import java.io.File;
+
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.tools.WSTools;
+import org.jboss.wsf.spi.test.JBossWSTest;
+
+/**
+ * Test case for http://jira.jboss.com/jira/browse/JBWS-1725
+ * 
+ * WSDL-JAVA Derivation of a complex type from a Simple type: bas64Binary
+ * is not mapped to byte[]
+ * 
+ * @author mageshbk at jboss.com
+ * @since Jul 19, 2007
+ */
+public class JBWS1725TestCase extends JBossWSTest
+{
+
+   public void testExtensionType() throws Exception
+   {
+      String resourceDir = "resources/tools/jbws1725";
+      String toolsDir = "tools/jbws1725";
+      String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+      new WSTools().generate(args);
+
+      compareSource(resourceDir + "/PasswordType.java", toolsDir + "/org/jboss/test/ws/jbws1725/PasswordType.java");
+   }
+
+   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();
+   }
+}


Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1725/JBWS1725TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/Extension.wsdl
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/Extension.wsdl	                        (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/Extension.wsdl	2007-07-19 12:08:44 UTC (rev 3948)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhoneBook' targetNamespace='http://test.jboss.org/ws/jbws1725' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://test.jboss.org/ws/jbws1725/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test.jboss.org/ws/jbws1725' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+  <schema targetNamespace='http://test.jboss.org/ws/jbws1725/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test.jboss.org/ws/jbws1725/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+   <complexType name="PasswordType">
+    <simpleContent>
+      <extension base="xsd:base64Binary"/>
+    </simpleContent>
+   </complexType>
+   <complexType name='Person'>
+    <sequence>
+     <element name='firstName' nillable='true' type='string'/>
+     <element name='surname' nillable='true' type='string'/>
+     <element name='password' type='tns:PasswordType'/>
+    </sequence>
+   </complexType>
+   <complexType name='TelephoneNumber'>
+    <sequence>
+     <element name='Number'>
+       <complexType>
+         <sequence>
+           <element name='areaCode' nillable='true' type='string'/>
+           <element name='number' nillable='true' type='string'/>
+         </sequence>
+       </complexType>
+     </element>     
+    </sequence>
+   </complexType>
+   <element name='lookup' type='tns:Person'/>
+   <element name='lookupResponse' type='tns:TelephoneNumber'/>
+  </schema>
+ </types>
+ <message name='PhoneBook_lookup'>
+  <part element='ns1:lookup' name='parameters'/>
+ </message>
+ <message name='PhoneBook_lookupResponse'>
+  <part element='ns1:lookupResponse' name='result'/>
+ </message>
+ <portType name='PhoneBook'>
+  <operation name='lookup'>
+   <input message='tns:PhoneBook_lookup'/>
+   <output message='tns:PhoneBook_lookupResponse'/>
+  </operation>
+ </portType>
+ <binding name='PhoneBookBinding' type='tns:PhoneBook'>
+  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='lookup'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body use='literal'/>
+   </input>
+   <output>
+    <soap:body use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='PhoneBook'>
+  <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
+   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file


Property changes on: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/Extension.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/PasswordType.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/PasswordType.java	                        (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/PasswordType.java	2007-07-19 12:08:44 UTC (rev 3948)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Mon Jul 16 18:47:44 IST 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.jbws1725;
+
+
+public class  PasswordType
+{
+
+protected byte[] _value;
+public PasswordType(){}
+
+public PasswordType(byte[] _value){
+this._value=_value;
+}
+public byte[] get_value() { return _value ;}
+
+public void set_value(byte[] _value){ this._value=_value; }
+
+}


Property changes on: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/PasswordType.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/wstools-config.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/wstools-config.xml	                        (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/wstools-config.xml	2007-07-19 12:08:44 UTC (rev 3948)
@@ -0,0 +1,9 @@
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+  <wsdl-java location="resources/tools/jbws1725/Extension.wsdl" parameter-style="bare">
+    <mapping file="extended-mapping.xml"/>
+  </wsdl-java>
+
+</configuration>
\ No newline at end of file


Property changes on: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1725/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list