Package org.apache.axiom.om.impl

Examples of org.apache.axiom.om.impl.OMNamespaceImpl


                }
            }
        }
        nsList.add(
                new OMNamespaceEx(
                        new OMNamespaceImpl(
                                "http://www.w3.org/XML/1998/namespace",
                                "xml"),
                        (OMContainer) contextNode));
        return nsList.iterator();
    }
View Full Code Here


public class SOAP11Factory extends OMLinkedListImplFactory implements SOAPFactory {
    /** Eran Chinthaka (chinthaka@apache.org) */


    public OMNamespace getNamespace() {
        return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                                   SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
    }
View Full Code Here

        return SOAP11Version.getSingleton();
    }

    public SOAPEnvelope createSOAPEnvelope() {
        return new SOAPEnvelopeImpl(
                new OMNamespaceImpl(
                        SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                this);
    }
View Full Code Here

        return new SOAP11FaultDetailImpl(parent, builder, this);
    }

    public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
        OMNamespace ns =
                new OMNamespaceImpl(
                        SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                        SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
        SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
        createSOAPHeader(env);
        createSOAPBody(env);
View Full Code Here

    public static Test suite() {
        return new TestSuite(OMNamespaceImplTest.class);
    }

    public void testGetNamespaceURI() {
        OMNamespaceImpl omNsImpl =
                new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace",
                                    "xml");
        assertEquals("http://www.w3.org/XML/1998/namespace",
                     omNsImpl.getNamespaceURI());
    }
View Full Code Here

        assertEquals("http://www.w3.org/XML/1998/namespace",
                     omNsImpl.getNamespaceURI());
    }

    public void testGetPrefix() {
        OMNamespaceImpl omNsImpl =
                new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace",
                                    "xml");
        assertEquals("xml", omNsImpl.getPrefix());
        omNsImpl = new OMNamespaceImpl("", null);
        assertNull(omNsImpl.getPrefix());
    }
View Full Code Here

        assertNull(omNsImpl.getPrefix());
    }

    /** This method wil test the equals method. */
    public void testEquals() {
        OMNamespaceImpl omNsImpl =
                new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace",
                                    null);
        assertTrue(omNsImpl.equals("http://www.w3.org/XML/1998/namespace",
                                   null));

        omNsImpl =
                new OMNamespaceImpl("http://www.w3.org/XML/1998/namespace",
                                    "xml");
        assertTrue(omNsImpl.equals("http://www.w3.org/XML/1998/namespace",
                                   "xml"));
        assertTrue(!omNsImpl.equals("http://www.w3.org/XML/1998/namespace",
                                    "xml2"));
        assertTrue(!omNsImpl.equals("http://www.w3.org/XML/1998/namespace",
                                    null));
        assertTrue(!omNsImpl.equals("http://www.w3.org/XML/2001/namespace",
                                    "xml"));
        assertTrue(!omNsImpl.equals(null,
                                    "xml"));
    }
View Full Code Here

        super(testName);
    }

    protected void setUp() throws Exception {
        OMFactory f = new OMLinkedListImplFactory();
        OMNamespace ns = new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", "");
        OMNamespace rootNS = new OMNamespaceImpl("http://sampleroot", "rootPrefix");
        element = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument));
        root = f.createOMElement("root", rootNS);
        root.addChild(element);
    }
View Full Code Here

    public void testName1DefaultPrefix() throws Exception {

        OMFactory f = new OMLinkedListImplFactory();

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

    public void testName2DefaultPrefix() throws Exception {

        OMFactory f = new OMLinkedListImplFactory();

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

TOP

Related Classes of org.apache.axiom.om.impl.OMNamespaceImpl

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.