Author: mageshbk(a)jboss.com
Date: 2008-03-10 08:48:13 -0400 (Mon, 10 Mar 2008)
New Revision: 5905
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/BaseException.java
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/JBWS2018TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/Test.java
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/TestException.java
stack/native/trunk/src/test/resources/tools/jbws-2018/
stack/native/trunk/src/test/resources/tools/jbws-2018/TestService.wsdl
stack/native/trunk/src/test/resources/tools/jbws-2018/jaxrpc-mapping.xml
stack/native/trunk/src/test/resources/tools/jbws-2018/wstools-config.xml
Log:
[JBWS-2018] Added testcase
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/BaseException.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/BaseException.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/BaseException.java 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws2018.base;
+
+/**
+ * @author mageshbk(a)jboss.com
+ * @since 10 March 2008
+ */
+public class BaseException extends Exception
+{
+ public BaseException()
+ {
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/BaseException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/JBWS2018TestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/JBWS2018TestCase.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/JBWS2018TestCase.java 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws2018;
+
+import java.io.File;
+
+import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.tools.WSTools;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * JBWS-2018 - Test the support of multiple namespace to multiple
+ * package generation of tools JavaToWSDL.
+ *
+ * @author mageshbk(a)jboss.com
+ * @since 10 March 2008
+ */
+public class JBWS2018TestCase extends WSToolsTest
+{
+ public final void testMultiplePackageNameSpace() throws Exception
+ {
+ String resourceDir = "resources/tools/jbws-2018";
+ String toolsDir = "tools/jbws-2018";
+ String[] args = new String[] { "-dest", toolsDir, "-config",
resourceDir + "/wstools-config.xml" };
+ new WSTools().generate(args);
+
+ semanticallyValidateWSDL(resourceDir + "/TestService.wsdl", toolsDir +
"/wsdl/TestService.wsdl");
+
+ JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
+ mappingValidator.validate(resourceDir + "/jaxrpc-mapping.xml", toolsDir +
"/jaxrpc-mapping.xml");
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/JBWS2018TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/Test.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/Test.java
(rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/Test.java 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws2018;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import org.jboss.test.ws.jbws2018.exception.TestException;
+
+/**
+ * @author mageshbk(a)jboss.com
+ * @since 10 March 2008
+ */
+public interface Test extends Remote
+{
+
+ public void testException() throws TestException, RemoteException;
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/Test.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/TestException.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/TestException.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/TestException.java 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws2018.exception;
+
+import org.jboss.test.ws.jbws2018.base.BaseException;
+
+/**
+ * @author mageshbk(a)jboss.com
+ * @since 10 March 2008
+ */
+public class TestException extends BaseException
+{
+ public TestException()
+ {
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jbws2018/TestException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/tools/jbws-2018/TestService.wsdl
===================================================================
--- stack/native/trunk/src/test/resources/tools/jbws-2018/TestService.wsdl
(rev 0)
+++ stack/native/trunk/src/test/resources/tools/jbws-2018/TestService.wsdl 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService'
targetNamespace='http://org.jboss.test.ws.jbws2018'
xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://com.other.base'
xmlns:ns2='http://com.other.exception'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.test.ws.jbws2018'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://com.other.exception'
xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns2='http://com.other.base'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://com.other.exception'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <import namespace='http://com.other.base'/>
+ <complexType name='TestException'>
+ <complexContent>
+ <extension base='ns2:BaseException'>
+ <sequence/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name='TestException' type='tns:TestException'/>
+ </schema>
+ <schema targetNamespace='http://com.other.base'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:ns1='http://com.other.exception'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://com.other.base'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <import namespace='http://com.other.exception'/>
+ <complexType name='BaseException'>
+ <sequence/>
+ </complexType>
+ <element name='BaseException' type='tns:BaseException'/>
+ </schema>
+ </types>
+ <message name='Test_testException'
xmlns='http://schemas.xmlsoap.org/wsdl/'/>
+ <message name='Test_testExceptionResponse'/>
+ <message name='TestException'>
+ <part element='ns2:TestException' name='TestException'/>
+ </message>
+ <portType name='Test'>
+ <operation name='testException'>
+ <input message='tns:Test_testException'/>
+ <output message='tns:Test_testExceptionResponse'/>
+ <fault message='tns:TestException' name='TestException'/>
+ </operation>
+ </portType>
+ <binding name='TestBinding' type='tns:Test'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='testException'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws.jbws2018'
use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws.jbws2018'
use='literal'/>
+ </output>
+ <fault name='TestException'>
+ <soap:fault name='TestException' use='literal'/>
+ </fault>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestBinding' name='TestPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
stack/native/trunk/src/test/resources/tools/jbws-2018/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/tools/jbws-2018/jaxrpc-mapping.xml
===================================================================
--- stack/native/trunk/src/test/resources/tools/jbws-2018/jaxrpc-mapping.xml
(rev 0)
+++ stack/native/trunk/src/test/resources/tools/jbws-2018/jaxrpc-mapping.xml 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,45 @@
+<?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>
+ <package-type>org.jboss.test.ws.jbws2018.exception</package-type>
+ <namespaceURI>http://com.other.exception</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws2018.base</package-type>
+ <namespaceURI>http://com.other.base</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws2018</package-type>
+ <namespaceURI>http://org.jboss.test.ws.jbws2018</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2018.exception.TestException</java-type>
+ <root-type-qname
xmlns:typeNS='http://com.other.exception'>typeNS:TestException</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws2018.base.BaseException</java-type>
+ <root-type-qname
xmlns:typeNS='http://com.other.base'>typeNS:BaseException</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ </java-xml-type-mapping>
+ <exception-mapping>
+
<exception-type>org.jboss.test.ws.jbws2018.exception.TestException</exception-type>
+ <wsdl-message
xmlns:exMsgNS='http://org.jboss.test.ws.jbws2018'>exMsgNS:TestException</wsdl-message>
+ </exception-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jbws2018.TestService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://org.jboss.test.ws.jbws2018'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestPort</port-name>
+ <java-port-name>TestPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jbws2018.Test</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://org.jboss.test.ws.jbws2018'>portTypeNS:Test</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS='http://org.jboss.test.ws.jbws2018'>bindingNS:TestBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>testException</java-method-name>
+ <wsdl-operation>testException</wsdl-operation>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on:
stack/native/trunk/src/test/resources/tools/jbws-2018/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/tools/jbws-2018/wstools-config.xml
===================================================================
--- stack/native/trunk/src/test/resources/tools/jbws-2018/wstools-config.xml
(rev 0)
+++ stack/native/trunk/src/test/resources/tools/jbws-2018/wstools-config.xml 2008-03-10
12:48:13 UTC (rev 5905)
@@ -0,0 +1,16 @@
+<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">
+ <global>
+ <package-namespace package="org.jboss.test.ws.jbws2018.base"
namespace="http://com.other.base"/>
+ <package-namespace package="org.jboss.test.ws.jbws2018.exception"
namespace="http://com.other.exception"/>
+ </global>
+
+ <java-wsdl>
+ <service name="TestService" style="rpc"
endpoint="org.jboss.test.ws.jbws2018.Test"/>
+ <namespaces target-namespace="http://org.jboss.test.ws.jbws2018"
type-namespace="http://org.jboss.test.ws.jbws2018"/>
+ <mapping file="jaxrpc-mapping.xml" />
+ <webservices ejb-link="TestEJB"/>
+ </java-wsdl>
+
+</configuration>
\ No newline at end of file
Property changes on:
stack/native/trunk/src/test/resources/tools/jbws-2018/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF