Package org.apache.axiom.om

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


        }
    }

    public OMElement generateOM() throws Exception {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        wsdl = fac.createOMNamespace(WSDL_NAMESPACE,
                DEFAULT_WSDL_NAMESPACE_PREFIX);
        OMElement ele = fac.createOMElement("definitions", wsdl);

        ele.addAttribute("targetNamespace", targetNamespace, null);
        generateNamespaces(fac, ele);
View Full Code Here


        setName(getName() + " [variant=" + variant.getName() + "]");
    }

    protected void runTest() throws Throwable {
        OMFactory factory = metaFactory.getOMFactory();
        OMNamespace ns = factory.createOMNamespace("urn:ns", "ns");
        OMElement element = variant.createOMElement(factory, new QName("urn:ns", "test", "ns"));
        assertTrue(element.isComplete());
        assertEquals("test", element.getLocalName());
        assertEquals(ns, element.getNamespace());
        Iterator it = element.getAllDeclaredNamespaces();
View Full Code Here

    }
   
    public void testGetElementText() throws Exception {
        OMFactory factory = omMetaFactory.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");
       
View Full Code Here

       
  }

  private static OMElement getEchoOMBlock(String text, String sequenceKey) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace);
    OMElement textElem = fac.createOMElement(Text,applicationNamespace);
    OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace);
   
    textElem.setText(text);
View Full Code Here

    serviceClient.cleanup();
  }
 
  private static OMElement getPingOMBlock(String text) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement pingElem = fac.createOMElement(ping, namespace);
    OMElement textElem = fac.createOMElement(Text, namespace);
   
    textElem.setText(text);
    pingElem.addChild(textElem);
View Full Code Here

        serviceClient.cleanup();
  }

  private static OMElement getEchoOMBlock(String text, String sequenceKey) {   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace);
    OMElement textElem = fac.createOMElement(Text,applicationNamespace);
    OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace);
   
    textElem.setText(text);
View Full Code Here

       
  }

  private static OMElement getEchoOMBlock(String text, String sequenceKey) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace);
    OMElement textElem = fac.createOMElement(Text,applicationNamespace);
    OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace);
   
    textElem.setText(text);
View Full Code Here

    serviceClient.cleanup();
  }
 
  private static OMElement getPingOMBlock(String text) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement pingElem = fac.createOMElement(ping, namespace);
    OMElement textElem = fac.createOMElement(Text, namespace);
   
    textElem.setText(text);
    pingElem.addChild(textElem);
View Full Code Here

        serviceClient.cleanup();
  }

  private static OMElement getEchoOMBlock(String text, String sequenceKey) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace applicationNamespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement echoStringElement = fac.createOMElement(echoString, applicationNamespace);
    OMElement textElem = fac.createOMElement(Text,applicationNamespace);
    OMElement sequenceElem = fac.createOMElement(Sequence,applicationNamespace);
   
    textElem.setText(text);
View Full Code Here

    serviceClient.cleanup();
  }
 
  private static OMElement getPingOMBlock() throws AxisFault {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName,"ns1");
    OMElement pingElem = fac.createOMElement(MTOMPing, namespace);
    OMElement attachmentElem = fac.createOMElement("Attachment", namespace);
   
      String imageName = "test-resources" + File.separator + "mtom-image.jpg";
      FileDataSource dataSource;
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.