[jboss-user] [JBossWS] - Call.setReturnType gives NPE
p_repetti
do-not-reply at jboss.com
Mon Mar 30 08:01:28 EDT 2009
Hello
I am using JBossWS inside JBoss AS 4.2.2GA. I guess the WS version is 2.0.1GA.
I get a NullPointer calling setReturnType(null) on an instance of Call.
The Java EE doc for setReturnType javax.xml.rpc.Call says that
"Invoking setReturnType(null) removes the return type for this Call object."
and so does the JBoss implementation, org.jboss.ws.core.jaxrpc.client.CallImpl.
The jboss stack trace is
Caused by: java.lang.NullPointerException
at org.jboss.ws.core.binding.TypeMappingImpl$IQName.(TypeMappingImpl.java:702)
at org.jboss.ws.core.binding.TypeMappingImpl.getJavaType(TypeMappingImpl
.java:214)
at org.jboss.ws.core.jaxrpc.client.CallImpl.setReturnType(CallImpl.java:
239)
I downloaded the sources and followed the stack trace. It looks to me that the NPE is justified, since the IQName constructor does not check the passed qname against null:
public IQName(QName name)
{
namespace = name.getNamespaceURI() != null ? name.getNamespaceURI().intern() : "".intern();
localPart = name.getLocalPart() != null ? name.getLocalPart().intern() : "".intern();
prefix = name.getPrefix() != null ? name.getPrefix().intern() : "".intern();
hash = name.hashCode();
}
Has anyone had the same problem ? Is it necessary to open a bug ?
-- Pierangelo
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221957#4221957
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221957
More information about the jboss-user
mailing list