Author: darran.lofthouse(a)jboss.com
Date: 2009-04-28 13:12:38 -0400 (Tue, 28 Apr 2009)
New Revision: 9908
Added:
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2633/
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2633/JBWS2633TestCase.java
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2633/
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2633/PhoneBook.wsdl
Log:
Add initial test case.
Added:
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2633/JBWS2633TestCase.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2633/JBWS2633TestCase.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2633/JBWS2633TestCase.java 2009-04-28
17:12:38 UTC (rev 9908)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jaxws.jbws2633;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * [JBWS-2633] - Test case to test wscompile where a namespace contains 'Public'
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 28th April 2009
+ */
+public class JBWS2633TestCase extends JBossWSTest
+{
+ private static final String FS = System.getProperty("file.separator"); //
'/' on unix, '\' on windows
+ private static final String PS = System.getProperty("path.separator"); //
':' on unix, ';' on windows
+ private static final String EXT = ":".equals(PS) ? ".sh" :
".bat";
+
+ private String JBOSS_HOME = System.getProperty("jboss.home");
+
+ public void testWSConsume() throws Exception
+ {
+ // use absolute path for the output to be re-usable
+ String absOutput = "target/wsconsume/jbws2633";
+ String wsdlFile =
createResourceFile("jaxws/jbws2633/PhoneBook.wsdl").getAbsolutePath();
+
+ String command = JBOSS_HOME + FS + "bin" + FS + "wsconsume" +
EXT + " -k -o " + absOutput + " " + wsdlFile;
+ executeCommand(command);
+
+ String packageDir = new File(absOutput +
"/org/jboss/_public/test/ws/jbws2633").getAbsolutePath();
+
+ checkFileExists(packageDir, "PhoneBook.java");
+ checkFileExists(packageDir, "PhoneBook_Service.java");
+
+ packageDir = new File(absOutput +
"/org/jboss/_public/test/ws/jbws2633/types").getAbsolutePath();
+
+ checkFileExists(packageDir, "Person.java");
+ checkFileExists(packageDir, "TelephoneNumber.java");
+ }
+
+ private static void checkFileExists(String packageDir, String filename)
+ {
+ File expectedFile = new File(packageDir + FS + filename);
+ assertTrue("File '" + filename + "' missing from folder
'" + packageDir + "'", expectedFile.exists());
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2633/JBWS2633TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2633/PhoneBook.wsdl
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2633/PhoneBook.wsdl
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2633/PhoneBook.wsdl 2009-04-28
17:12:38 UTC (rev 9908)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhoneBook'
targetNamespace='http://test.Public.jboss.org/ws/jbws2633'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:ns1='http://test.Public.jboss.org/ws/jbws2633/types'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://test.Public.jboss.org/ws/jbws2633'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema
targetNamespace='http://test.Public.jboss.org/ws/jbws2633/types'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://test.Public.jboss.org/ws/jbws2633/types'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+
+ <complexType name='Person'>
+ <sequence>
+ <element name='firstName' nillable='true'
type='string'/>
+ <element name='surname' nillable='true'
type='string'/>
+ </sequence>
+ </complexType>
+
+ <complexType name='TelephoneNumber'>
+ <sequence>
+ <element name='areaCode' nillable='true'
type='string'/>
+ <element name='number' nillable='true'
type='string'/>
+ </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:
stack/native/branches/dlofthouse/JBWS-2633/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2633/PhoneBook.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF