[jbossws-commits] JBossWS SVN: r4448 - in legacy/branches/jbossws-1.2.1.GA_CP: jbossws-tests/src/java/org/jboss/test/ws/tools and 3 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Aug 20 17:16:19 EDT 2007


Author: darran.lofthouse at jboss.com
Date: 2007-08-20 17:16:19 -0400 (Mon, 20 Aug 2007)
New Revision: 4448

Added:
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml
Removed:
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml
Modified:
   legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/ToolsHelper.java
Log:
[JBPAPP-291]/[ASPATCH-274] JBossWS - NPE in WSDL to Java when webservices.xml requested but no global package mapping.

Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/ToolsHelper.java	2007-08-20 21:13:54 UTC (rev 4447)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/ToolsHelper.java	2007-08-20 21:16:19 UTC (rev 4448)
@@ -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]);
             }
 

Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536 (from rev 4089, branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536)

Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java
===================================================================
--- branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java	2007-08-02 10:44:44 UTC (rev 4089)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java	2007-08-20 21:16:19 UTC (rev 4448)
@@ -1,55 +0,0 @@
-/*
- * 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.test.ws.JBossWSTest;
-import org.jboss.util.xml.DOMUtils;
-import org.jboss.ws.tools.WSTools;
-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);      
-   }
-
-}

Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java (from rev 4089, branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java	                        (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1536/JBWS1536TestCase.java	2007-08-20 21:16:19 UTC (rev 4448)
@@ -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.test.ws.JBossWSTest;
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.ws.tools.WSTools;
+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);      
+   }
+
+}

Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536 (from rev 4089, branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536)

Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl
===================================================================
--- branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl	2007-08-02 10:44:44 UTC (rev 4089)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl	2007-08-20 21:16:19 UTC (rev 4448)
@@ -1,54 +0,0 @@
-<?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

Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl (from rev 4089, branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl	                        (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/PhoneBook.wsdl	2007-08-20 21:16:19 UTC (rev 4448)
@@ -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

Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml
===================================================================
--- branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536/webservices.xml	2007-08-02 10:44:44 UTC (rev 4089)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml	2007-08-20 21:16:19 UTC (rev 4448)
@@ -1,15 +0,0 @@
-<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

Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml (from rev 4089, branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536/webservices.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml	                        (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/webservices.xml	2007-08-20 21:16:19 UTC (rev 4448)
@@ -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

Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml
===================================================================
--- branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml	2007-08-02 10:44:44 UTC (rev 4089)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml	2007-08-20 21:16:19 UTC (rev 4448)
@@ -1,11 +0,0 @@
-<?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>

Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml (from rev 4089, branches/jbossws-1.2.1.GA_JBWS-1768/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml	                        (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1536/wstools-config.xml	2007-08-20 21:16:19 UTC (rev 4448)
@@ -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>




More information about the jbossws-commits mailing list