Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2729

NullPointerException in MessageElement.copyNode for DOM Documents with Processing Instructions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4
    • None
    • None
    • Vista, java 1.6

    Description

      Trying to create a MessageElement from a DOM Document that contains a processing instruction results in a NullPointerException

      Here's a trivial demonstration:
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db=dbf.newDocumentBuilder();
      Document domDoc = db.parse(new InputSource(new StringReader("<rec><data>stuff</data><?boom?></rec>")));
      Element el = domDoc.getDocumentElement();
      new MessageElement(el);

      The root problem is that MessageElement is only prepared to accept nodes of type CharacterData. I have enhanced MessageElement and NodeImpl to accept processing instructions.

      I will submit the changes to the developers list

      Attachments

        Activity

          People

            Unassigned Unassigned
            levan@oclc.org Ralph LeVan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: