NullPointerException in WSIFMarshaller.isSimpleType()
-----------------------------------------------------
Key: SM-358
URL: http://jira.activemq.org/jira//browse/SM-358
Project: ServiceMix
Type: Bug
Reporter: Ken Berthelot
Attachments: WSIFMarshaler.java
There is a logic flaw in WSIFMarshaller.isSimpleType() that causes a
NullPointerException for wsdl messages that use complex types. The current
logic assumes the existence of a "type" attribute for the "part" element. (e.g.
<wsdl:part name="key" type="xsd:string"/>). For messages that use complex
types, the "element" attribute is used in place of the "type" attribute. (e.g.
<wsdl:part name="key" element="tns:lookup" />). The following code results in
a NullPointerException for complex types:
QName typeName = part.getTypeName();
return "http://www.w3.org/2001/XMLSchema".equals(typeName.getNamespaceURI());
I've attached a patch that checks for typeName == null. The resulting code
will return false for any case except where
"http://www.w3.org/2001/XMLSchema".equals(typeName.getNamespaceURI().
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira