[JBossWS] - Two webservice classes define method with same name (bug?)
by gbdt
Hi,
I have a test case in which I get wrong WSDLs:
(Both classes are in the same package)
File1:
| package com.XXXX;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
|
| @WebService
| @Stateless
| public class TestClass1 {
|
| @WebMethod
| public ****Integer**** method(@WebParam(name="f")Float f) {
| return null;
| }
| }
|
File2:
| package com.XXXX;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
|
| @WebService
| @Stateless
| public class TestClass2 {
|
| @WebMethod
| public ****Double**** method(@WebParam(name="f")Float f) {
| return 17.0;
| }
| }
|
The problem is that for both services the WSDL definition of the return type is xs:int, while for the second class it should be a double.
For TestClass1:
| <types>
| <xs:schema targetNamespace="http://XXXX.com/" version="1.0" xmlns:tns="http://XXXX.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="method" type="tns:method" />
| <xs:element name="methodResponse" type="tns:methodResponse" />
| <xs:complexType name="method">
| <xs:sequence>
| <xs:element minOccurs="0" name="f" type="xs:float" />
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="methodResponse">
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="****xs:int****" />
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
|
And for TestClass2:
| ...
| <types>
| <xs:schema targetNamespace="http://XXXX.com/" version="1.0" xmlns:tns="http://XXXX.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="method" type="tns:method" />
| <xs:element name="methodResponse" type="tns:methodResponse" />
| <xs:complexType name="method">
| <xs:sequence>
| <xs:element minOccurs="0" name="f" type="xs:float" />
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="methodResponse">
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="****xs:int****" />
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| ...
|
The second method definition, for a totally different service has an incorrect return type.
Is is a bug or some kind of error on my side?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078139#4078139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078139
17 years, 4 months
[JBossWS] - NullPointerException with a WS request
by sandypm0
I am using Jboss-4.0.5 and JbossWS-1.2.1. I get this error, and it occurs now and then. 80% of the time it works and 20% of the time it throws the following error.
| 2007-08-24 17:09:41,540 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] Err
| or creating SOAPFault message
| java.lang.NullPointerException
| at com.sun.org.apache.xerces.internal.dom.NodeImpl.toString(Unknown Sour
| ce)
| at org.jboss.ws.soap.NodeImpl.toString(NodeImpl.java:561)
| at java.lang.String.valueOf(String.java:1475)
| at org.jboss.lang.JBossStringBuilder.append(JBossStringBuilder.java:116)
| at org.jboss.ws.soap.SOAPContentElement.appendChild(SOAPContentElement.j
| ava:713)
| at org.jboss.ws.soap.SOAPElementImpl.addChildElement(SOAPElementImpl.jav
| a:221)
| at org.jboss.ws.soap.SOAPContentElement.addChildElement(SOAPContentEleme
| nt.java:441)
| at org.jboss.ws.soap.SOAPFaultImpl.setFaultCode(SOAPFaultImpl.java:253)
| at org.jboss.ws.soap.SOAPBodyImpl.addFault(SOAPBodyImpl.java:133)
| at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.toSOAPMessage(SOAPFaultE
| xceptionHelper.java:214)
| at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(
| SOAPFaultExceptionHelper.java:188)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.jav
| a:223)
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(Service
| EndpointManager.java:355)
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointSe
| rvlet.java:115)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointS
| ervlet.java:76)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
| ctionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
| rocessConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
| int.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
| kerThread.java:112)
| at java.lang.Thread.run(Thread.java:797)
| 2007-08-24 17:09:41,541 ERROR [org.jboss.ws.server.StandardEndpointServlet] Erro
| r processing web service request
| Servlet.service
| () for servlet AutoLendingServlet threw exception
| javax.xml.rpc.JAXRPCException: Cannot create SOAPFault message for: javax.xml.rp
| c.soap.SOAPFaultException: java.lang.NullPointerException
| at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.exceptionToFaultMessage(
| SOAPFaultExceptionHelper.java:194)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.jav
| a:223)
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(Service
| EndpointManager.java:355)
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointSe
| rvlet.java:115)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointS
| ervlet.java:76)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
| ctionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
| rocessConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
| int.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
| kerThread.java:112)
| at java.lang.Thread.run(Thread.java:797)
|
The Client side is registering the SOAP request which was sent down to the server, and everything looks OK. Is there any known issue regarding this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077941#4077941
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077941
17 years, 4 months