Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-358

NullPointerException in WSIFMarshaller.isSimpleType()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0-M1
    • 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().

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            kberthelot Ken Berthelot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: