Author: darran.lofthouse(a)jboss.com
Date: 2006-12-14 07:19:05 -0500 (Thu, 14 Dec 2006)
New Revision: 1644
Added:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/JBWS1428TestCase.java
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObject.java
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObjectSEI.java
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/ValueObjectService.wsdl
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/jaxrpc-mapping.xml
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/wstools-config.xml
Log:
JBWS-1428 Test Case
Added:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/JBWS1428TestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/JBWS1428TestCase.java 2006-12-14
11:57:37 UTC (rev 1643)
+++
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/JBWS1428TestCase.java 2006-12-14
12:19:05 UTC (rev 1644)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.jbws1428;
+
+import java.io.FileInputStream;
+
+import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.tools.WSTools;
+import org.w3c.dom.Element;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 Dec 2006
+ */
+public class JBWS1428TestCase extends WSToolsTest
+{
+
+ public void testGenerate() throws Exception
+ {
+ String resourceDir = "resources/tools/jbws1428";
+ String toolsDir = "tools/jbws1428";
+ String[] args = new String[] { "-dest", toolsDir, "-config",
resourceDir + "/wstools-config.xml" };
+ new WSTools().generate(args);
+
+ Element exp = DOMUtils.parse(new FileInputStream(resourceDir +
"/ValueObjectService.wsdl"));
+ Element was = DOMUtils.parse(new FileInputStream(toolsDir +
"/wsdl/ValueObjectService.wsdl"));
+ assertEquals("WSDL Validation", exp, was);
+
+ JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
+ mappingValidator.validate(resourceDir + "/jaxrpc-mapping.xml", toolsDir +
"/jaxrpc-mapping.xml");
+ }
+}
Property changes on:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/JBWS1428TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObject.java
===================================================================
---
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObject.java 2006-12-14
11:57:37 UTC (rev 1643)
+++
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObject.java 2006-12-14
12:19:05 UTC (rev 1644)
@@ -0,0 +1,66 @@
+/*
+ * 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.jbws1428;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 Dec 2006
+ */
+public class ValueObject
+{
+
+ private String myMessage;
+
+ private String[] myValues;
+
+ public String getMyMessage()
+ {
+ return myMessage;
+ }
+
+ public void setMyMessage(String myMessage)
+ {
+ this.myMessage = myMessage;
+ }
+
+ public String[] getMyValues()
+ {
+ return myValues;
+ }
+
+ public void setMyValues(String[] myValues)
+ {
+ this.myValues = myValues;
+ }
+
+ public String getMyValues(int i)
+ {
+ return myValues[i];
+ }
+
+ public void setMyValues(int i, String myValues)
+ {
+ this.myValues[i] = myValues;
+ }
+
+}
Property changes on:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObject.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObjectSEI.java
===================================================================
---
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObjectSEI.java 2006-12-14
11:57:37 UTC (rev 1643)
+++
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObjectSEI.java 2006-12-14
12:19:05 UTC (rev 1644)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.jbws1428;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 Dec 2006
+ */
+public interface ValueObjectSEI extends Remote
+{
+
+ public ValueObject echo(final ValueObject value) throws RemoteException;
+
+}
Property changes on:
branches/dlofthouse/JBWS-1428/src/test/java/org/jboss/test/ws/tools/jbws1428/ValueObjectSEI.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/ValueObjectService.wsdl
===================================================================
---
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/ValueObjectService.wsdl 2006-12-14
11:57:37 UTC (rev 1643)
+++
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/ValueObjectService.wsdl 2006-12-14
12:19:05 UTC (rev 1644)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='ValueObjectService'
targetNamespace='http://org.jboss.test.ws/jbws1428'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:ns1='http://org.jboss.test.ws/jbws1428/types'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.test.ws/jbws1428'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://org.jboss.test.ws/jbws1428/types'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://org.jboss.test.ws/jbws1428/types'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <complexType name='echo'>
+ <sequence>
+ <element name='ValueObject_1' nillable='true'
type='tns:ValueObject'/>
+ </sequence>
+ </complexType>
+ <complexType name='echoResponse'>
+ <sequence>
+ <element name='result' nillable='true'
type='tns:ValueObject'/>
+ </sequence>
+ </complexType>
+ <complexType name='ValueObject'>
+ <sequence>
+ <element name='myMessage' nillable='true'
type='string'/>
+ <element maxOccurs='unbounded' minOccurs='0'
name='myValues' nillable='true' type='string'/>
+ </sequence>
+ </complexType>
+ <element name='echo' type='tns:echo'/>
+ <element name='echoResponse' type='tns:echoResponse'/>
+ </schema>
+ </types>
+ <message name='ValueObjectSEI_echo'>
+ <part element='ns1:echo' name='parameters'/>
+ </message>
+ <message name='ValueObjectSEI_echoResponse'>
+ <part element='ns1:echoResponse' name='result'/>
+ </message>
+ <portType name='ValueObjectSEI'>
+ <operation name='echo'>
+ <input message='tns:ValueObjectSEI_echo'/>
+ <output message='tns:ValueObjectSEI_echoResponse'/>
+ </operation>
+ </portType>
+ <binding name='ValueObjectSEIBinding' type='tns:ValueObjectSEI'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='ValueObjectService'>
+ <port binding='tns:ValueObjectSEIBinding'
name='ValueObjectSEIPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/ValueObjectService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/jaxrpc-mapping.xml
===================================================================
---
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/jaxrpc-mapping.xml 2006-12-14
11:57:37 UTC (rev 1643)
+++
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/jaxrpc-mapping.xml 2006-12-14
12:19:05 UTC (rev 1644)
@@ -0,0 +1,69 @@
+<?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.tools.jbws1428</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1428/types</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.tools.jbws1428.ValueObject</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.ws/jbws1428/types'>typeNS:ValueObject</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>myMessage</java-variable-name>
+ <xml-element-name>myMessage</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>myValues</java-variable-name>
+ <xml-element-name>myValues</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.tools.jbws1428.ValueObjectSEI_echo_RequestStruct</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.ws/jbws1428/types'>typeNS:echo</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>valueObject_1</java-variable-name>
+ <xml-element-name>ValueObject_1</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+
<java-type>org.jboss.test.ws.tools.jbws1428.ValueObjectSEI_echo_ResponseStruct</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.ws/jbws1428/types'>typeNS:echoResponse</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>result</java-variable-name>
+ <xml-element-name>result</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.tools.jbws1428.ValueObjectService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://org.jboss.test.ws/jbws1428'>serviceNS:ValueObjectService</wsdl-service-name>
+ <port-mapping>
+ <port-name>ValueObjectSEIPort</port-name>
+ <java-port-name>ValueObjectSEIPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.tools.jbws1428.ValueObjectSEI</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://org.jboss.test.ws/jbws1428'>portTypeNS:ValueObjectSEI</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS='http://org.jboss.test.ws/jbws1428'>bindingNS:ValueObjectSEIBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echo</java-method-name>
+ <wsdl-operation>echo</wsdl-operation>
+ <wrapped-element/>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.test.ws.tools.jbws1428.ValueObject</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1428'>wsdlMsgNS:ValueObjectSEI_echo</wsdl-message>
+ <wsdl-message-part-name>ValueObject_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+
<method-return-value>org.jboss.test.ws.tools.jbws1428.ValueObject</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1428'>wsdlMsgNS:ValueObjectSEI_echoResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/wstools-config.xml
===================================================================
---
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/wstools-config.xml 2006-12-14
11:57:37 UTC (rev 1643)
+++
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/wstools-config.xml 2006-12-14
12:19:05 UTC (rev 1644)
@@ -0,0 +1,13 @@
+<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">
+
+ <java-wsdl>
+ <service name="ValueObjectService"
+ endpoint="org.jboss.test.ws.tools.jbws1428.ValueObjectSEI"
style="document" />
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1428"
+ type-namespace="http://org.jboss.test.ws/jbws1428/types" />
+ <mapping file="jaxrpc-mapping.xml" />
+ </java-wsdl>
+
+</configuration>
\ No newline at end of file
Property changes on:
branches/dlofthouse/JBWS-1428/src/test/resources/tools/jbws1428/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF