Examples of createOMText()


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

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();

        OMNamespace namespace = factory.createOMNamespace("http://testuri.org", "test");
        OMElement documentElement = factory.createOMElement("DocumentElement", namespace);
        factory.createOMText(documentElement, "this is a TEXT");
        factory.createOMComment(documentElement, "this is a comment");
        factory.createOMText(documentElement, "this is a TEXT block 2");
       
        XMLStreamReader xmlStreamReader = documentElement.getXMLStreamReader();
        //move to the Start_Element
View Full Code Here

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

        OMNamespace namespace = factory.createOMNamespace("http://testuri.org", "test");
        OMElement documentElement = factory.createOMElement("DocumentElement", namespace);
        factory.createOMText(documentElement, "this is a TEXT");
        factory.createOMComment(documentElement, "this is a comment");
        factory.createOMText(documentElement, "this is a TEXT block 2");
       
        XMLStreamReader xmlStreamReader = documentElement.getXMLStreamReader();
        //move to the Start_Element
        while (xmlStreamReader.getEventType() != XMLStreamReader.START_ELEMENT) {
            xmlStreamReader.next();
View Full Code Here

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

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMElement omElement = factory.createOMElement("element2", null);
        final String normalText = "regular text and ";
        final String text = "this is <some> text in a CDATA";
        factory.createOMText(omElement, normalText);
        factory.createOMText(omElement, text, XMLStreamConstants.CDATA);
        assertEquals(normalText + text, omElement.getText());
    }
}
View Full Code Here

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

        OMFactory factory = metaFactory.getOMFactory();
        OMElement omElement = factory.createOMElement("element2", null);
        final String normalText = "regular text and ";
        final String text = "this is <some> text in a CDATA";
        factory.createOMText(omElement, normalText);
        factory.createOMText(omElement, text, XMLStreamConstants.CDATA);
        assertEquals(normalText + text, omElement.getText());
    }
}
View Full Code Here

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

        OMElement response = factory.createOMElement("response", ns);
        OMElement image    = factory.createOMElement("image", ns);

        FileDataSource fileDataSource = new FileDataSource(tempFile);
        dataHandler = new DataHandler(fileDataSource);
        OMText textData = factory.createOMText(dataHandler, true);
        image.addChild(textData);
        response.addChild(image);
        payload.addChild(response);

        MessageContext outMsgCtx = MessageContext.getCurrentMessageContext()
View Full Code Here

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

        OMNamespace nsaip = factory.createOMNamespace(topicns, "aip");

        // set the target topic
        OMElement topicOm = factory.createOMElement("Topic", nsaip);
        factory.createOMText(topicOm, topic);

        // set addressing, transport and proxy url

        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(addUrl));
View Full Code Here

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

            OMElement deliveryOm = factory.createOMElement("Delivery", nswse);
            deliveryOm.addAttribute(factory.createOMAttribute("Mode", null,
                    "http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push"));
            OMElement notifyToOm = factory.createOMElement("NotifyTo", nswse);
            OMElement addressOm = factory.createOMElement("Address", nswsa);
            factory.createOMText(addressOm, address);
            OMElement expiresOm = factory.createOMElement("Expires", nswse);
            factory.createOMText(expiresOm, expires);
            OMElement filterOm = factory.createOMElement("Filter", nswse);
            filterOm.addAttribute(factory.createOMAttribute("Dialect", null,
                    "http://synapse.apache.org/eventing/dialect/topicFilter"));
View Full Code Here

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

                    "http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push"));
            OMElement notifyToOm = factory.createOMElement("NotifyTo", nswse);
            OMElement addressOm = factory.createOMElement("Address", nswsa);
            factory.createOMText(addressOm, address);
            OMElement expiresOm = factory.createOMElement("Expires", nswse);
            factory.createOMText(expiresOm, expires);
            OMElement filterOm = factory.createOMElement("Filter", nswse);
            filterOm.addAttribute(factory.createOMAttribute("Dialect", null,
                    "http://synapse.apache.org/eventing/dialect/topicFilter"));
            factory.createOMText(filterOm, topic);
View Full Code Here

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

            OMElement expiresOm = factory.createOMElement("Expires", nswse);
            factory.createOMText(expiresOm, expires);
            OMElement filterOm = factory.createOMElement("Filter", nswse);
            filterOm.addAttribute(factory.createOMAttribute("Dialect", null,
                    "http://synapse.apache.org/eventing/dialect/topicFilter"));
            factory.createOMText(filterOm, topic);


            notifyToOm.addChild(addressOm);
            deliveryOm.addChild(notifyToOm);
            subscribeOm.addChild(deliveryOm);
View Full Code Here

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

            OMElement subscribeOm = factory.createOMElement("Unsubscribe", nswse);
            serviceClient.engageModule("addressing");
            options.setTo(new EndpointReference(addUrl));
            options.setAction("http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe");
            OMElement identifierOm = factory.createOMElement("Identifier", nswse);
            factory.createOMText(identifierOm, identifier);
            serviceClient.addHeader(identifierOm);
            serviceClient.setOptions(options);
            System.out.println("UnSubscribing \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
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.