[ http://jira.activemq.org/jira//browse/SM-358?page=all ] Guillaume Nodet resolved SM-358: --------------------------------
Assign To: Guillaume Nodet Resolution: Fixed Fix Version: 3.0-M1 Author: gnodet Date: Tue Mar 21 10:25:46 2006 New Revision: 387598 URL: http://svn.apache.org/viewcvs?rev=387598&view=rev Log: SM-358: NullPointerException in WSIFMarshaller.isSimpleType() Patch provided by Ken Berthelot Modified: incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/wsif/WSIFMarshaler.java > NullPointerException in WSIFMarshaller.isSimpleType() > ----------------------------------------------------- > > Key: SM-358 > URL: http://jira.activemq.org/jira//browse/SM-358 > Project: ServiceMix > Type: Bug > Reporter: Ken Berthelot > Assignee: Guillaume Nodet > Fix For: 3.0-M1 > 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