Package org.apache.axis2.om.impl.dom.factory

Examples of org.apache.axis2.om.impl.dom.factory.OMDOMFactory.createOMElement()


    String childLocalName = "TestChildLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
   
    OMElement elem = factory.createOMElement(localName,namespace,prefix);
    OMElement childElem = factory.createOMElement(childLocalName,namespace, prefix);
   
    elem.addChild(childElem);
   
    Iterator it = elem.getChildrenWithName(new QName(namespace, childLocalName));
   
View Full Code Here


  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

    String localName = "TestLocalName";
    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
    String tempText = "The quick brown fox jumps over the lazy dog";

    OMElement elem = factory.createOMElement(localName, namespace, prefix);
    OMText textNode = factory.createText(elem, tempText);

    assertEquals("Text value mismatch", tempText, textNode.getText());
  }
View Full Code Here

    String namespace = "http://ws.apache.org/axis2/ns";
    String prefix = "axis2";
    String tempText = "The quick brown fox jumps over the lazy dog";
    String textToAppend = " followed by another fox";

    OMElement elem = factory.createOMElement(localName, namespace, prefix);
    OMText textNode = factory.createText(elem, tempText);

    ((Text) textNode).appendData(textToAppend);

    assertEquals("Text value mismatch", tempText + textToAppend, textNode
View Full Code Here

    SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
    SOAPEnvelope envelope = fac.getDefaultEnvelope();
    OMNamespace namespace = fac.createOMNamespace(
        "http://axis2/test/namespace1", "ns1");

    OMElement params = fac.createOMElement(operationName, namespace);
    OMElement param1OM = fac.createOMElement("param1", namespace);
    OMElement param2OM = fac.createOMElement("param2", namespace);
    param1OM.setText(Integer.toString(param1));
    param2OM.setText(Integer.toString(param2));
    params.addChild(param1OM);
View Full Code Here

    SOAPEnvelope envelope = fac.getDefaultEnvelope();
    OMNamespace namespace = fac.createOMNamespace(
        "http://axis2/test/namespace1", "ns1");

    OMElement params = fac.createOMElement(operationName, namespace);
    OMElement param1OM = fac.createOMElement("param1", namespace);
    OMElement param2OM = fac.createOMElement("param2", namespace);
    param1OM.setText(Integer.toString(param1));
    param2OM.setText(Integer.toString(param2));
    params.addChild(param1OM);
    params.addChild(param2OM);
View Full Code Here

    OMNamespace namespace = fac.createOMNamespace(
        "http://axis2/test/namespace1", "ns1");

    OMElement params = fac.createOMElement(operationName, namespace);
    OMElement param1OM = fac.createOMElement("param1", namespace);
    OMElement param2OM = fac.createOMElement("param2", namespace);
    param1OM.setText(Integer.toString(param1));
    param2OM.setText(Integer.toString(param2));
    params.addChild(param1OM);
    params.addChild(param2OM);
    envelope.getBody().setFirstChild(params);
View Full Code Here

    SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
    SOAPEnvelope envelope = fac.getDefaultEnvelope();
    OMNamespace namespace = fac.createOMNamespace(
        "http://axis2/test/namespace1", "ns1");

    OMElement params = fac.createOMElement(operationName, namespace);
    OMElement paramOM = fac.createOMElement("param", namespace);
    paramOM.setText(Integer.toString(param));
    params.addChild(paramOM);
    envelope.getBody().setFirstChild(params);
View Full Code Here

    SOAPEnvelope envelope = fac.getDefaultEnvelope();
    OMNamespace namespace = fac.createOMNamespace(
        "http://axis2/test/namespace1", "ns1");

    OMElement params = fac.createOMElement(operationName, namespace);
    OMElement paramOM = fac.createOMElement("param", namespace);
    paramOM.setText(Integer.toString(param));
    params.addChild(paramOM);
    envelope.getBody().setFirstChild(params);

    if (groupContextId != null) {
View Full Code Here

                "xsi");
        envelope.declareNamespace("http://www.w3.org/2001/XMLSchema",
                "xsd");

        operation =
                omFactory.createOMElement("doGoogleSearch",
                        "urn:GoogleSearch",
                        "ns1");
        envelope.getBody().addChild(operation);
        operation.addAttribute("soapenv:encordingStyle",
                "http://schemas.xmlsoap.org/soap/encoding/", null);
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.