Author: thomas.diesler(a)jboss.com
Date: 2007-01-09 10:04:03 -0500 (Tue, 09 Jan 2007)
New Revision: 1875
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1427/
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1427/JBWS1427TestCase.java
trunk/jbossws-tests/src/main/resources/tools/jbws1427/
trunk/jbossws-tests/src/main/resources/tools/jbws1427/ProcessClaim.wsdl
Log:
[JBWS-1427] - NPE in WSDL11Reader.processOperationInput
More to come
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1427/JBWS1427TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1427/JBWS1427TestCase.java 2007-01-09
14:28:41 UTC (rev 1874)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1427/JBWS1427TestCase.java 2007-01-09
15:04:03 UTC (rev 1875)
@@ -0,0 +1,298 @@
+/*
+ * 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.jbws1427;
+
+import java.io.File;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Test for a port name which ends 'PortType'
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
+ * @since 27th September 2006
+ */
+public class JBWS1427TestCase extends JBossWSTest
+{
+ public final void testPortTypePort() throws Exception
+ {
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ File wsdlFile = new File("resources/tools/jbws1427/ProcessClaim.wsdl");
+ factory.parse(wsdlFile.toURL());
+
+ }
+
+/*
+Hi,
+
+I'm using Jboss 4.0.4 GA on Windows XP and Redhat Linux. I'm trying to deploy an
EJB 2 SLSB as a web service. I get a NullPointerException
+on deployment.
+
+My SEI:
+Code:
+
+package za.co.testws.interfaces;
+import java.rmi.*;
+import za.co.testws.services.*;
+
+public interface RequestService extends Remote {
+ public Message processClaim(Message messsge) throws RemoteException;
+}
+
+
+
+SEI Implementation:
+Code:
+
+package za.co.testws.services;
+import java.rmi.*;
+import javax.ejb.*;
+import org.apache.log4j.*;
+import za.co.testws.interfaces.*;
+
+public class RequestServiceEJB implements SessionBean, RequestService {
+ private Logger logger = Logger.getLogger(this.getClass());
+
+ public Message processClaim(Message message) throws RemoteException {
+ logger.info("Executing business logic:" + message);
+ return message;
+ }
+// including the normal ejbActivate, ejbCreate etc with empty implementations
+}
+
+package za.co.testws.services;
+
+public class Message {
+ private String name;
+ private Integer status;
+
+ public Message() {}
+ public Message(String name, Integer status) {
+ setName(name);
+ setStatus(status);
+ }
+ // the getters & setters
+}
+
+
+
+
+The WSDL file: (generated by wscompile from jwsdp 2)
+Code:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="processClaim"
+ targetNamespace="http://za.co.testws.interfaces"
+ xmlns:tns="http://za.co.testws.interfaces"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:ns2="http://za.co.testws.interfaces/types">
+ <types>
+ <schema targetNamespace="http://za.co.testws.interfaces/types"
+ xmlns:tns="http://za.co.testws.interfaces/types"
+
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+ <import
namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+ <complexType name="Message">
+ <sequence>
+ <element name="name" type="string" />
+ <element name="status" type="soap11-enc:int" />
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+ <message name="RequestService_processClaim">
+ <part name="Message_1" type="ns2:Message" />
+ </message>
+ <message name="RequestService_processClaimResponse">
+ <part name="result" type="ns2:Message" />
+ </message>
+ <portType name="RequestServicePort">
+ <operation name="processClaim" parameterOrder="Message_1">
+ <input message="tns:RequestService_processClaim" />
+ <output message="tns:RequestService_processClaimResponse" />
+ </operation>
+ </portType>
+ <binding name="RequestServiceBinding"
type="tns:RequestService">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
+ style="document"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+ <operation name="processClaim">
+ <soap:operation
soapAction="http://za.co.testws.interfaces/processClaim"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+ <input>
+ <soap:body use="literal"
namespace="http://za.co.testws.interfaces" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://za.co.testws.interfaces" />
+ </output>
+ </operation>
+ </binding>
+ <service name="ProcessClaim">
+ <port name="RequestServicePort"
+ binding="tns:RequestServiceBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
+
+
+
+
+The generated jaxrp-mapping file
+Code:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<java-wsdl-mapping
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.1"
+
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>za.co.testws.interfaces</package-type>
+ <namespaceURI>http://za.co.testws.interfaces/types</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>za.co.testws.interfaces</package-type>
+ <namespaceURI>http://za.co.testws.interfaces</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>za.co.testws.services.Message</java-type>
+ <root-type-qname
+ xmlns:typeNS="http://za.co.testws.interfaces/types">
+ typeNS:Message
+ </root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>name</java-variable-name>
+ <xml-element-name>name</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>status</java-variable-name>
+ <xml-element-name>status</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+ <service-interface>
+ za.co.testws.interfaces.ProcessClaim
+ </service-interface>
+ <wsdl-service-name
+ xmlns:serviceNS="http://za.co.testws.interfaces">
+ serviceNS:ProcessClaim
+ </wsdl-service-name>
+ <port-mapping>
+ <port-name>RequestServicePort</port-name>
+ <java-port-name>RequestServicePort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>
+ za.co.testws.interfaces.RequestService
+ </service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS="http://za.co.testws.interfaces">
+ portTypeNS:RequestService
+ </wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS="http://za.co.testws.interfaces">
+ bindingNS:RequestServiceBinding
+ </wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>processClaim</java-method-name>
+ <wsdl-operation>processClaim</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>za.co.testws.services.Message</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
+ xmlns:wsdlMsgNS="http://za.co.testws.interfaces">
+ wsdlMsgNS:RequestService_processClaim
+ </wsdl-message>
+ <wsdl-message-part-name>Message_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>
+ za.co.testws.services.Message
+ </method-return-value>
+ <wsdl-message
+ xmlns:wsdlMsgNS="http://za.co.testws.interfaces">
+ wsdlMsgNS:RequestService_processClaimResponse
+ </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>
+
+
+
+
+My webservices.xml:
+Code:
+
+<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:impl="http://com.underworld.crimeportal/ws4ee"
+
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"
+ version="1.1">
+
+ <webservice-description>
+
<webservice-description-name>RequestServiceEJB</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/processClaim.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>RequestService</port-component-name>
+ <wsdl-port>impl:RequestServicePort</wsdl-port>
+
<service-endpoint-interface>za.co.testws.interfaces.RequestService</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>SubmitRequestEJB</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
+
+
+
+The ejb-jar.xml
+Code:
+
+<ejb-jar
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://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
+ version="2.1">
+ <enterprise-beans>
+ <session>
+ <ejb-name>SubmitRequestEJB</ejb-name>
+
<service-endpoint>za.co.testws.interfaces.RequestService</service-endpoint>
+ <ejb-class>za.co.testws.services.RequestServiceEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
+
+ *
+ */
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1427/JBWS1427TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/tools/jbws1427/ProcessClaim.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/tools/jbws1427/ProcessClaim.wsdl 2007-01-09
14:28:41 UTC (rev 1874)
+++ trunk/jbossws-tests/src/main/resources/tools/jbws1427/ProcessClaim.wsdl 2007-01-09
15:04:03 UTC (rev 1875)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="processClaim"
+ targetNamespace="http://za.co.testws.interfaces"
+ xmlns:tns="http://za.co.testws.interfaces"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:ns2="http://za.co.testws.interfaces/types">
+ <types>
+ <schema targetNamespace="http://za.co.testws.interfaces/types"
+ xmlns:tns="http://za.co.testws.interfaces/types"
+
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+ <import
namespace="http://schemas.xmlsoap.org/soap/encoding/" />
+ <complexType name="Message">
+ <sequence>
+ <element name="name" type="string" />
+ <element name="status" type="soap11-enc:int" />
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+ <message name="RequestService_processClaim">
+ <part name="Message_1" type="ns2:Message" />
+ </message>
+ <message name="RequestService_processClaimResponse">
+ <part name="result" type="ns2:Message" />
+ </message>
+ <portType name="RequestServicePort">
+ <operation name="processClaim" parameterOrder="Message_1">
+ <input message="tns:RequestService_processClaim" />
+ <output message="tns:RequestService_processClaimResponse" />
+ </operation>
+ </portType>
+ <binding name="RequestServiceBinding"
type="tns:RequestService">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
+ style="document"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+ <operation name="processClaim">
+ <soap:operation
soapAction="http://za.co.testws.interfaces/processClaim"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
+ <input>
+ <soap:body use="literal"
namespace="http://za.co.testws.interfaces" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://za.co.testws.interfaces" />
+ </output>
+ </operation>
+ </binding>
+ <service name="ProcessClaim">
+ <port name="RequestServicePort"
+ binding="tns:RequestServiceBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
trunk/jbossws-tests/src/main/resources/tools/jbws1427/ProcessClaim.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF