Package org.apache.axiom.om

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


                soapFactory.createSOAPHeader(root);
            }
            root.getHeader().addChild(newOM);
        } else {
            om.insertSiblingBefore(newOM);
            om.detach();
        }
    }
   
    public void appendHeaderBlock(String namespace, String localPart, Block block)
    throws WebServiceException {
View Full Code Here



    public void removeHeaderBlock(String namespace, String localPart) throws WebServiceException {
        OMElement om = this._getChildOMElement(root.getHeader(), namespace, localPart);
        while (om != null) {
            om.detach();
            om = this._getChildOMElement(root.getHeader(), namespace, localPart);
        }
    }

    public String traceString(String indent) {
View Full Code Here

        // Forces the parser to read all of the blocks
        getNumBodyBlocks();

        OMElement om = this._getChildOMElement(_getBodyBlockParent(), index);
        if (om != null) {
            om.detach();
        }
    }

    public int getNumHeaderBlocks() throws WebServiceException {
        return _getNumChildElements(root.getHeader());
View Full Code Here

                soapFactory.createSOAPHeader(root);
            }
            root.getHeader().addChild(newOM);
        } else {
            om.insertSiblingBefore(newOM);
            om.detach();
        }
    }
   
    public void appendHeaderBlock(String namespace, String localPart, Block block)
    throws WebServiceException {
View Full Code Here


    public void removeHeaderBlock(String namespace, String localPart) throws WebServiceException {
        OMElement om = this._getChildOMElement(root.getHeader(), namespace, localPart);
        while (om != null) {
            om.detach();
            om = this._getChildOMElement(root.getHeader(), namespace, localPart);
        }
    }

    public String traceString(String indent) {
View Full Code Here

              OMElement addressingHeader = header.getFirstChildWithName(qname);
              if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {
                log.trace("isAddressingHeaderAlreadyAvailable: Removing existing header:" +
                    addressingHeader.getLocalName());
              }
              addressingHeader.detach();
            } else {
              status = exists;
            }
          }
View Full Code Here

        }
        OMElement a = (OMElement)root.getFirstOMChild();
        assertEquals("a", a.getLocalName());
        OMElement b = (OMElement)a.getNextOMSibling();
        assertEquals("b", b.getLocalName());
        OMNode returnValue = b.detach();
        assertSame(b, returnValue); // Detach is expected to do a "return this"
        assertNull(b.getParent());
        OMElement c = (OMElement)a.getNextOMSibling();
        assertEquals("c", c.getLocalName());
        assertSame(c, a.getNextOMSibling());
View Full Code Here

                    header.detach();
                }
            } else if (o instanceof OMElement) {
                OMElement omElem = (OMElement) o;
                if (omElem.getLocalName().equals(qName.getLocalPart())) {
                    omElem.detach();
                }
            }
        }
    }
View Full Code Here

     */

    public void setPayloadXML(Object payload) throws OMException, ScriptException {
        OMElement firstChild = mc.getEnvelope().getBody().getFirstElement();
        firstChild.insertSiblingAfter(xmlHelper.toOMElement(payload));
        firstChild.detach();
    }

    /**
     * Get the XML representation of the complete SOAP envelope
     * @return return an object that represents the payload in the current scripting language
View Full Code Here

               OMElement om = (OMElement) o;
               OMNamespace ns = om.getNamespace();
               if (ns != null &&
                       (AddressingConstants.Submission.WSA_NAMESPACE.equals(ns.getNamespaceURI())
                       || AddressingConstants.Final.WSA_NAMESPACE.equals(ns.getNamespaceURI()))) {
                   om.detach();
               }
           }
       }
   }
}
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.