Examples of OMDOMFactory


Examples of org.apache.axiom.om.impl.dom.factory.OMDOMFactory

     * @throws Exception
     */
    public void testQNames() throws Exception {
        String ATTR = "attr";
        String NSURI = "http://ns1";
        OMFactory fac = new OMDOMFactory();
        OMNamespace ns = new NamespaceImpl(NSURI);
        OMAttribute attr = fac.createOMAttribute(ATTR, ns, "value");
        QName qname = attr.getQName();
        assertEquals("Wrong namespace", NSURI, qname.getNamespaceURI());
        assertEquals("Wrong localPart", ATTR, qname.getLocalPart());
        assertEquals("Wrong prefix", "", qname.getPrefix());
    }
View Full Code Here

Examples of org.apache.axis2.om.impl.dom.factory.OMDOMFactory

  public OMDOMFactoryTest(String name) {
    super(name);
  }
 
  public void testCreateElement() {
    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);
    QName qname = elem.getQName();
   
    assertEquals("Localname mismatch",localName,qname.getLocalPart());
    assertEquals("Namespace mismatch",namespace,qname.getNamespaceURI());
    assertEquals("namespace prefix mismatch", prefix, qname.getPrefix());
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.