Examples of createOMNamespace()


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

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        // Use "new String" to create String objects that are not interned
        OMNamespace ns1 = factory.createOMNamespace(new String("urn:ns1"), "p");
        OMNamespace ns2 = factory.createOMNamespace(new String("urn:ns2"), "q");
        OMElement root = factory.createOMElement("root", ns1);
        root.addAttribute("attr", "value", ns2);
        factory.createOMElement("child", ns2, root);
       
        OMXMLStreamReaderConfiguration configuration = new OMXMLStreamReaderConfiguration();
View Full Code Here

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

    }

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMElement element = factory.createOMElement(new QName("test"));
        OMNamespace ns = factory.createOMNamespace("", "p");
        try {
            element.addAttribute("attr", "value", ns);
            fail("Expected IllegalArgumentException");
        } catch (IllegalArgumentException ex) {
            // Expected
View Full Code Here

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

    }

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMElement root = factory.createOMElement(new QName("test"));
        OMNamespace ns = factory.createOMNamespace("urn:ns", "p");
        root.declareNamespace(ns);
        OMElement child = factory.createOMElement(new QName("test"), root);
        OMAttribute att = factory.createOMAttribute("test", ns, "test");
        child.addAttribute(att);
        Iterator it = child.getAllDeclaredNamespaces();
View Full Code Here

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

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

        // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix
        OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
        OMNamespace ns = f.createOMNamespace("http://DUMMYNS", "DUMMYPREFIX");
        OMElement element =
                f.createOMElement(new TestDataSource(testDocument), "DUMMYNAME", ns);
        OMElement root = f.createOMElement("root", rootNS);
        root.addChild(element);
View Full Code Here

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

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

        // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix
        OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
        OMNamespace ns = f.createOMNamespace("http://DUMMYNS", "DUMMYPREFIX");
        OMElement element =
                f.createOMElement(new TestDataSource(testDocument), "DUMMYNAME", ns);
        OMElement root = f.createOMElement("root", rootNS);
        root.addChild(element);
View Full Code Here

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

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

        // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix
        OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
        OMNamespace ns = f.createOMNamespace("http://www.sosnoski.com/uwjws/library", "");
        OMElement element =
                f.createOMElement(new TestDataSource(testDocument2), "library", ns);
        OMElement root = f.createOMElement("root", rootNS);
        root.addChild(element);
View Full Code Here

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

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

        // Create OMSE with a DUMMYPREFIX prefix even though the underlying element uses the default prefix
        OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
        OMNamespace ns = f.createOMNamespace("http://www.sosnoski.com/uwjws/library", "");
        OMElement element =
                f.createOMElement(new TestDataSource(testDocument2), "library", ns);
        OMElement root = f.createOMElement("root", rootNS);
        root.addChild(element);
View Full Code Here

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

    }

    protected void runTest() throws Throwable {
        // Build a root element and child OMSE
        OMFactory f = metaFactory.getOMFactory();
        OMNamespace ns = f.createOMNamespace("http://www.sosnoski.com/uwjws/library", "");
        OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
        OMElement child = f.createOMElement(new TestDataSource(testDocument), "library", ns);
        OMElement root = f.createOMElement("root", rootNS);
       
        // Trigger expansion of the child OMSE
View Full Code Here

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

    protected void runTest() throws Throwable {
        // Build a root element and child OMSE
        OMFactory f = metaFactory.getOMFactory();
        OMNamespace ns = f.createOMNamespace("http://www.sosnoski.com/uwjws/library", "");
        OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
        OMElement child = f.createOMElement(new TestDataSource(testDocument), "library", ns);
        OMElement root = f.createOMElement("root", rootNS);
       
        // Trigger expansion of the child OMSE
        // This will cause the child to be partially parsed (i.e. incomplete)
View Full Code Here

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

        }
        String prefix = element.getPrefix();
        if (prefix == null) {
            prefix = "";
        }
        OMNamespace ns = omdomFactory.createOMNamespace(element.getNamespaceURI(), prefix);
        OMElement omElement = omdomFactory.createOMElement(element.getLocalName(), ns);
        return new SOAPElementImpl((ElementImpl)omElement);
    }

}
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.