Package org.apache.axiom.om.impl.dom.factory

Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory.createOMElement()


  public void testSetText() {
    OMDOMFactory factory = new OMDOMFactory();
    String localName = "TestLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
    OMElement elem = factory.createOMElement(localName,namespace,prefix);
   
    String text = "The quick brown fox jumps over the lazy dog";
   
    elem.setText(text);
   
View Full Code Here


    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
    String tempText = "The quick brown fox jumps over the lazy dog";
    String textToAppend = " followed by another";
   
    OMElement elem = factory.createOMElement(localName,namespace,prefix);
    OMText textNode = factory.createOMText(elem,tempText);
   
    ((Text)textNode).appendData(textToAppend);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try {
View Full Code Here

    String localName = "TestLocalName";
    String childLocalName = "TestChildLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
   
    OMElement elem = factory.createOMElement(localName,namespace,prefix);
    OMElement childElem = factory.createOMElement(childLocalName,namespace, prefix);
   
    elem.addChild(childElem);
   
    Iterator it = elem.getChildrenWithName(new QName(namespace, childLocalName));
View Full Code Here

    String childLocalName = "TestChildLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
   
    OMElement elem = factory.createOMElement(localName,namespace,prefix);
    OMElement childElem = factory.createOMElement(childLocalName,namespace, prefix);
   
    elem.addChild(childElem);
   
    Iterator it = elem.getChildrenWithName(new QName(namespace, childLocalName));
   
View Full Code Here

        String namespace = "http://ws.apache.org/axis2/ns";
        String prefix = "axis2";
        String tempText = "The quick brown fox jumps over the lazy dog";
        String textToAppend = " followed by another";

        OMElement elem = factory.createOMElement(localName, namespace, prefix);
        OMText textNode = factory.createOMText(elem, tempText);

        ((Text) textNode).appendData(textToAppend);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

        String namespace = "http://ws.apache.org/axis2/ns";
        String prefix = "axis2";
        String tempText = "The quick brown fox jumps over the lazy dog";
        String textToAppend = " followed by another fox";

        OMElement elem = factory.createOMElement(localName, namespace, prefix);
        OMText textNode = factory.createOMText(elem, tempText);

        ((Text) textNode).appendData(textToAppend);

        assertEquals("Text value mismatch", tempText + textToAppend, textNode
View Full Code Here

     */
    public SOAPElement createElement(String localName) throws SOAPException {
        OMDOMFactory omdomFactory = (OMDOMFactory) DOOMAbstractFactory.getOMFactory();

        OMNamespace ns = omdomFactory.createOMNamespace(null, null);
        OMElement omElement = omdomFactory.createOMElement(localName, ns);
        return new SOAPElementImpl((ElementImpl) omElement);
    }

    /**
     * Create a new <code>SOAPElement</code> object with the given
View Full Code Here

        String NSURI = "http://testns";
        String NSURI_UPPER = "HTTP://TESTNS";

        OMFactory fac = new OMDOMFactory();
        OMNamespace ns = new OMNamespaceImpl(NSURI, null);
        OMElement el = fac.createOMElement("foo", null);
        el.declareNamespace(NSURI, "p");
        assertNull(el.findNamespace(NSURI_UPPER, "p"));
    }
}
View Full Code Here

        String namespace = "http://ws.apache.org/axis2/ns";
        String prefix = "axis2";
        String tempText = "The quick brown fox jumps over the lazy dog";
        String textToAppend = " followed by another";

        OMElement elem = factory.createOMElement(localName, namespace, prefix);
        OMText textNode = factory.createOMText(elem, tempText);

        ((Text) textNode).appendData(textToAppend);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

        if (soapVersion.equals(SOAPConstants.SOAP_1_2_PROTOCOL)) {
            omdomFactory = (OMDOMFactory)DOOMAbstractFactory.getSOAP12Factory();
        } else {
            omdomFactory = (OMDOMFactory)DOOMAbstractFactory.getSOAP11Factory();
        }
        OMElement omElement = omdomFactory.createOMElement(new QName(localName));
        return new SOAPElementImpl((ElementImpl)omElement);
    }

    /**
     * Create a new <code>SOAPElement</code> object with the given local name, prefix and uri.
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.