[jbossws-commits] JBossWS SVN: r4064 - in branches/jbossws-2.0/jbossws-core/src: test/java/org/jboss/test/ws/tools and 3 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Aug 1 13:29:10 EDT 2007
Author: darran.lofthouse at jboss.com
Date: 2007-08-01 13:29:10 -0400 (Wed, 01 Aug 2007)
New Revision: 4064
Added:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1536/
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java
branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/
branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/PhoneBook.wsdl
branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/webservices.xml
branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/wstools-config.xml
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
Log:
JBWS-1536 - NPE in WSDL to Java when webservices.xml requested but no global package mapping.
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2007-08-01 15:55:28 UTC (rev 4063)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2007-08-01 17:29:10 UTC (rev 4064)
@@ -331,7 +331,7 @@
if (wsdl.getInterfaces().length == 1)
{
- String seiPackage = wsdlToJava.getNamespacePackageMap().get(wsdl.getTargetNamespace());
+ String seiPackage = getPackageName(wsdl, glc);
seiName = seiPackage + "." + wsdlToJava.getServiceEndpointInterfaceName(wsdl.getInterfaces()[0]);
}
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java 2007-08-01 17:29:10 UTC (rev 4064)
@@ -0,0 +1,55 @@
+/*
+ * 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.jbws1536;
+
+import java.io.FileInputStream;
+
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.ws.tools.WSTools;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.w3c.dom.Element;
+
+/**
+ * [JBWS-1536] NPE in WSDL to Java when webservices.xml requested but no global package mapping
+ *
+ * @see http://jira.jboss.com/jira/browse/JBWS-1536
+ *
+ * @author darran.lofthouse at jboss.com
+ * @since Aug 1, 2007
+ */
+public class JBWS1536TestCase extends JBossWSTest
+{
+
+ public final void testGenerate() throws Exception
+ {
+ String resourceDir = "resources/tools/jbws1536";
+ String toolsDir = "tools/jbws1536";
+ String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+
+ new WSTools().generate(args);
+
+ Element expected = DOMUtils.parse(new FileInputStream("resources/tools/jbws1536/webservices.xml"));
+ Element was = DOMUtils.parse(new FileInputStream("tools/jbws1536/webservices.xml"));
+ assertEquals(expected, was);
+ }
+
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/PhoneBook.wsdl
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/PhoneBook.wsdl (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/PhoneBook.wsdl 2007-08-01 17:29:10 UTC (rev 4064)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhoneBook' targetNamespace='http://test.jboss.org/ws/jbws1536' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://test.jboss.org/ws/jbws1536/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test.jboss.org/ws/jbws1536' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://test.jboss.org/ws/jbws1536/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test.jboss.org/ws/jbws1536/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: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/PhoneBook.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/webservices.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/webservices.xml (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/webservices.xml 2007-08-01 17:29:10 UTC (rev 4064)
@@ -0,0 +1,15 @@
+<webservices 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_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>PhoneBook</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/PhoneBook.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/null</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>PhoneBookPort</port-component-name>
+ <wsdl-port xmlns:portNS='http://test.jboss.org/ws/jbws1536'>portNS:PhoneBookPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1536.PhoneBook_PortType</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>PhoneBook</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/wstools-config.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/wstools-config.xml (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/wstools-config.xml 2007-08-01 17:29:10 UTC (rev 4064)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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/jbws1536/PhoneBook.wsdl" parameter-style="bare">
+ <webservices ejb-link="PhoneBook" />
+ </wsdl-java>
+
+</configuration>
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/resources/tools/jbws1536/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jbossws-commits
mailing list