Examples of insertSiblingBefore()


Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

  protected void _setChild(QName qname, OMElement element) {
    OMElement e = getFirstChildWithName(qname);
    if (e == null && element != null) {
      addChild(element);
    } else if (e != null && element != null) {
      e.insertSiblingBefore(element);
      e.discard();
    } else if (e != null && element == null) {
      e.discard();
    }
  }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

    protected void runTest() throws Throwable {
        OMElement parent = soapFactory.createOMElement("parent", null);
        OMElement child1 = soapFactory.createOMElement("child1", null, parent);
        SOAPHeaderBlock hb = soapFactory.createSOAPHeaderBlock("MyHeader", soapFactory.createOMNamespace("urn:test", "p"));
        try {
            child1.insertSiblingBefore(hb);
            fail("Expected SOAPProcessingException");
        } catch (SOAPProcessingException ex) {
            // Expected
        }
    }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

    protected void runTest() throws Throwable {
        OMElement parent = soapFactory.createOMElement("parent", null);
        OMElement child1 = soapFactory.createOMElement("child1", null, parent);
        SOAPFault fault = soapFactory.createSOAPFault();
        try {
            child1.insertSiblingBefore(fault);
            fail("Expected SOAPProcessingException");
        } catch (SOAPProcessingException ex) {
            // Expected
        }
    }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

                _createOMElementFromBlock(localPart, ns, block, soapFactory, true);
        OMElement om = this._getChildOMElement(root.getHeader(), namespace, localPart);
        if (om == null) {
            root.getOrCreateHeader().addChild(newOM);
        } else {
            om.insertSiblingBefore(newOM);
            om.detach();
        }
    }
   
    public void appendHeaderBlock(String namespace, String localPart, Block block)
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

    OMElement el = getFirstChildWithName(ENTRY);
    if (el == null) {
      addEntry(entry);
    } else {
      entry.setParentElement(this);
      el.insertSiblingBefore((OMElement)entry);
    }
  }
 
  public Entry insertEntry() {
    FOMFactory fomfactory = (FOMFactory) factory;
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

  @Override
  public void addChild(OMNode node) {
    if (isComplete() && node instanceof OMElement && !(node instanceof Entry)) {
      OMElement el = this.getFirstChildWithName(ENTRY);
      if (el != null) {
        el.insertSiblingBefore(node);
        return;
      }
    }
    super.addChild(node);
  }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

  protected void _setChild(QName qname, OMElement element) {
    OMElement e = getFirstChildWithName(qname);
    if (e == null && element != null) {
      addChild(element);
    } else if (e != null && element != null) {
      e.insertSiblingBefore(element);
      e.discard();
    } else if (e != null && element == null) {
      e.discard();
    }
  }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

    OMElement el = getFirstChildWithName(ENTRY);
    if (el == null) {
      addEntry(entry);
    } else {
      entry.setParentElement(this);
      el.insertSiblingBefore((OMElement)entry);
    }
  }
 
  public Entry insertEntry() {
    FOMFactory fomfactory = (FOMFactory) factory;
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

  @Override
  public void addChild(OMNode node) {
    if (isComplete() && node instanceof OMElement && !(node instanceof Entry)) {
      OMElement el = this.getFirstChildWithName(ENTRY);
      if (el != null) {
        el.insertSiblingBefore(node);
        return;
      }
    }
    super.addChild(node);
  }
View Full Code Here

Examples of org.apache.axiom.om.OMElement.insertSiblingBefore()

        OMElement el = getFirstChildWithName(ENTRY);
        if (el == null) {
            addEntry(entry);
        } else {
            entry.setParentElement(this);
            el.insertSiblingBefore((OMElement)entry);
        }
        return this;
    }

    public Entry insertEntry() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.