Package org.apache.axis2.om

Examples of org.apache.axis2.om.OMNode


    }

    public void testElementSerilizationSOAPBodyCacheOff() throws Exception {
        SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
        OMNode node = env.getBody();
        node.serializeWithCache(writer);
    }
View Full Code Here


            omNode.discard();
            omNode =
                    org.apache.axis2.om.OMAbstractFactory.getOMFactory()
                    .createText(parent, value);
        } else if (omNode.getType() == OMNode.ELEMENT_NODE) {
            OMNode firstChild = ((OMElement) omNode).getFirstChild();
            if (firstChild == null) {
                firstChild =
                        org.apache.axis2.om.OMAbstractFactory.getOMFactory()
                        .createText((OMElement) omNode, value);
            } else if (firstChild.getType() == OMNode.TEXT_NODE) {
                firstChild.discard();
                firstChild =
                        org.apache.axis2.om.OMAbstractFactory.getOMFactory()
                        .createText((OMElement) omNode, value);
            }
        } else {
View Full Code Here

     *
     * @see org.w3c.dom.Node#getFirstChild()
     */
    public org.w3c.dom.Node getFirstChild() {
        //
        OMNode child = ((OMElement) omNode).getFirstChild();
        return new NodeImpl(child);
    }
View Full Code Here

    /**
     * dom Node method
     */
    public org.w3c.dom.Node getNextSibling() {

        OMNode sibling = omNode.getNextSibling();
        return new NodeImpl(sibling);
    }
View Full Code Here

    /**
     * dom Node method
     */
    public org.w3c.dom.Node getPreviousSibling() {

        OMNode prevSibling = omNode.getPreviousSibling();
        return new NodeImpl(prevSibling);
    }
View Full Code Here

          if(omChild instanceof OMText){
            OMText omTextChild = (OMText)omChild;
            TextImpl textChild = new TextImpl(omTextChild);
            list.addNode(textChild);
          }else{
            OMNode omNodeChild = (OMNode)omChild;
            Node nodeChild = new NodeImpl(omNodeChild);
            list.addNode(nodeChild);
          }
           
        }
View Full Code Here

     * @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node)
     */
    public org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
            throws DOMException {

        OMNode child = Dom2OmUtils.toOM(node);
        if (omNode.getType() == OMNode.ELEMENT_NODE)
            ((OMElement) omNode).addChild(child);
        return null;
    }
View Full Code Here

     * @see org.w3c.dom.Node#removeChild(org.w3c.dom.Node)
     */
    public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
            throws DOMException {
        //Check if equals method has been removed from OMNode
        OMNode child = Dom2OmUtils.toOM(oldChild);
        if (omNode.getType() == OMNode.ELEMENT_NODE) {
            Iterator iter = ((OMElement) omNode).getChildren();
            while (iter.hasNext()) {
                Object nextChild = iter.next();
                if (nextChild instanceof OMNode && nextChild.equals(child)) {
View Full Code Here

    /**
     * @see org.w3c.dom.Node#replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
     */
    public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
                                         org.w3c.dom.Node refChild) throws DOMException {
        OMNode newOmChild = Dom2OmUtils.toOM(newChild);
        OMNode refOmChild = Dom2OmUtils.toOM(refChild);
        if (omNode.getType() == OMNode.ELEMENT_NODE) {
            Iterator iter = ((OMElement) omNode).getChildren();
            while (iter.hasNext()) {
                Object nextChild = iter.next();
                if (nextChild instanceof OMNode &&
View Full Code Here

        return !waitingDescs.isEmpty();
    }

    public void processRest(OMElement rpcElement) throws Exception {
        // The siblings of this should be SOAP 1.1 independent elements
        OMNode nextElement = rpcElement.getNextSibling();
        while (nextElement != null) {
            if (nextElement instanceof OMElement) {
                OMAttribute idAttr =
                        ((OMElement)nextElement).getAttribute(new QName("id"));
                if (idAttr != null) {
                    idFound(idAttr.getValue(), (OMElement)nextElement);
                }
            }
            nextElement = nextElement.getNextSibling();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.om.OMNode

Copyright © 2018 www.massapicom. 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.