Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Regression
Description
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().