Examples of createOMText()


Examples of org.apache.axiom.om.OMFactory.createOMText()

             (27)   </s12:Body>
             (28) </s12:Envelope>
             */
            OMElement subscribeOm = factory.createOMElement("Renew", nswse);
            OMElement expiresOm = factory.createOMElement("Expires", nswse);
            factory.createOMText(expiresOm, expires);
            subscribeOm.addChild(expiresOm);
            serviceClient.engageModule("addressing");
            options.setTo(new EndpointReference(addUrl));
            options.setAction("http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew");
            OMElement identifierOm = factory.createOMElement("Identifier", nswse);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

            subscribeOm.addChild(expiresOm);
            serviceClient.engageModule("addressing");
            options.setTo(new EndpointReference(addUrl));
            options.setAction("http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew");
            OMElement identifierOm = factory.createOMElement("Identifier", nswse);
            factory.createOMText(identifierOm, identifier);
            serviceClient.addHeader(identifierOm);
            serviceClient.setOptions(options);
            System.out.println("SynapseSubscription Renew \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

            OMElement subscribeOm = factory.createOMElement("GetStatus", nswse);
            serviceClient.engageModule("addressing");
            options.setTo(new EndpointReference(addUrl));
            options.setAction("http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus");
            OMElement identifierOm = factory.createOMElement("Identifier", nswse);
            factory.createOMText(identifierOm, identifier);
            serviceClient.addHeader(identifierOm);
            serviceClient.setOptions(options);
            System.out.println("GetStatus using \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

        OMElement document = factory.createOMElement(new QName("urn:test", "document"));
        OMElement name = factory.createOMElement(new QName("name"));
        name.setText("some name");
        document.addChild(name);
        OMElement content = factory.createOMElement(new QName("content"));
        content.addChild(factory.createOMText(dh, true));
        document.addChild(content);
        return document;
    }
   
    private void test(DataHandler dh, StAXOMBuilder builder, boolean same, boolean usesAttachments, boolean expectBareReader) throws IOException {
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

public class XOPRoundtripTest extends TestCase {
    public void test() {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        DataHandler dh = new DataHandler(new TestDataSource('x', Runtime.getRuntime().maxMemory()));
        OMElement element1 = factory.createOMElement(new QName("test"));
        element1.addChild(factory.createOMText(dh, true));
        XMLStreamReader originalReader = element1.getXMLStreamReader();
        XOPEncodingStreamReader encodedReader = new XOPEncodingStreamReader(originalReader,
                ContentIDGenerator.DEFAULT, OptimizationPolicy.DEFAULT);
        XMLStreamReader decodedReader = new XOPDecodingStreamReader(encodedReader, encodedReader);
        OMElement element2 = OMXMLBuilderFactory.createStAXOMBuilder(decodedReader).getDocumentElement();
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

                "http://www.example.org/stuff", "m");
        OMElement data = fac.createOMElement("data", dataName);

        DataSource dataSource = getTestResourceDataSource(imageInFileName);
        expectedDH = new DataHandler(dataSource);
        OMText binaryNode = fac.createOMText(expectedDH, true);

        envelope.addChild(body);
        body.addChild(data);
        data.addChild(binaryNode);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMNamespace testNamespace = factory.createOMNamespace("http://test.ws.org", "test");
        OMElement documentElement = factory.createOMElement("Employees", testNamespace);
        documentElement.declareNamespace(testNamespace);
        OMText txt = factory.createOMText(documentElement, " ");
        OMElement e = factory.createOMElement("Employee", testNamespace, documentElement);
        e.setText("Apache Developer");

        Iterator childrenIter = documentElement.getChildrenWithName(new QName("http://test.ws.org", "Employee", "test"));
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMElement element = factory.createOMElement("test", null);
       
        // Add some children of various types
        factory.createOMText(element, "some text");
        factory.createOMText(element, "cdata section", OMNode.CDATA_SECTION_NODE);
        factory.createOMComment(element, "comment");
        factory.createOMProcessingInstruction(element, "piTarget", "piData");
        factory.createOMElement("child", null, element);
View Full Code Here

Examples of org.apache.axiom.om.OMFactory.createOMText()

        OMFactory factory = metaFactory.getOMFactory();
        OMElement element = factory.createOMElement("test", null);
       
        // Add some children of various types
        factory.createOMText(element, "some text");
        factory.createOMText(element, "cdata section", OMNode.CDATA_SECTION_NODE);
        factory.createOMComment(element, "comment");
        factory.createOMProcessingInstruction(element, "piTarget", "piData");
        factory.createOMElement("child", null, element);

        // Set the text; this should remove all child nodes
View Full Code Here

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

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

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

        assertEquals("Text value mismatch", tempText, textNode.getText());
    }

    public void testAppendText() {
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.