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

SOAPElement#checkParent not invoked consistently

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.13
    • 1.2.14
    • DOOM, LLOM
    • None

    Description

      SOAPElement (both the LLOM and DOOM variant) defines a mechanism that validates that each type of SOAP element can only be added in the right place (e.g. that a SOAPHeader can only be added as a child of a SOAPEnvelope). This is implemented by overriding the setParent method:

      /** This has to be implemented by all the derived classes to check for the correct parent. */
      protected abstract void checkParent(OMElement parent) throws SOAPProcessingException;

      public void setParent(OMContainer element) {
      super.setParent(element);

      if (element instanceof OMElement)

      { checkParent((OMElement) element); }

      }

      However, this code is not invoked in all cases:

      • In LLOM, it is invoked by insertSiblingAfter and insertSiblingBefore, but not by addChild.
      • In DOOM, it is never invoked because the setParent method is not overridden (although the checkParent methods are defined).
      • It is not invoked for SOAPHeaderBlock because SOAPHeaderBlock extends OMSourcedElement and the setParent method is not overridden (although the checkParent methods are present).

      Attachments

        Activity

          People

            veithen Andreas Veithen
            veithen Andreas Veithen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: