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

NullPointerException in MessageElement.copyNode for DOM Documents with Processing Instructions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      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

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

              Dates

              • Created:
                Updated: