Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-169

org.apache.axiom.om.impl.dom.ParentNode.removeChild(Node) is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.2.8
    • 1.2.9
    • None
    • None
    • Axis-1.4.1, Addressing-1.41, Sandesha2-1.3, Rampart-1.4

    Description

      Parent:
      <soapenv:Header
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsse:Security
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      soapenv:mustUnderstand="1" />
      <wsa:To>http://192.168.1.5:6060/axis2/services/personalDataService@286914895/</wsa:To>
      <wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo>
      <wsa:MessageID>urn:uuid:E3FC5985317BCF16351233758322948</wsa:MessageID>
      <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse</wsa:Action>
      <wsa:RelatesTo>urn:uuid:A07FCCC1972C7E06671233758319824</wsa:RelatesTo>
      </soapenv:Header>

      securityHeader:
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      soapenv:mustUnderstand="1" />

      Node parent = securityHeader.getParentNode();
      parent.removeChild(securityHeader);

      org.apache.axiom.om.impl.dom.ParentNode.removeChild(Node) is
      called and it gets to this, begining with line 482:
      if (this.firstChild == tempNode) {
      // If this is the first child
      this.firstChild = null;
      this.lastChild = null;
      tempNode.parentNode = null;
      }

      tempNode is the security header and it is equal to the firstChild of
      the envelope header.
      The firstChild is removed... then the lastChild(which is the relatesTo
      child) is removed...

      The result is this:
      <soapenv:Header
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:wsa="http://www.w3.org/2005/08/addressing" />

      Attachments

        1. WSCOMMONS-435.patch
          1 kB
          Andrei Ivanov

        Activity

          People

            veithen Andreas Veithen
            shadow Andrei Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: