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

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


        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
}
View Full Code Here


        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
}
View Full Code Here

    private static OMElement getBody() {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac
                .createOMNamespace("http://example1.org/example1", "example1");
        OMElement id = fac.createOMElement("id", omNs);
        id.addChild(fac.createText(id, "Axis2"));
        return id;
    }

    public static void main(String[] args) throws Exception {
        Options options = new Options();
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "tcp://localhost:8080/axis2/services/MyService", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
}
View Full Code Here

                .loadImage(new FileInputStream(inputFile));

        ImageDataSource dataSource = new ImageDataSource("test.jpg",
                expectedImage);
        expectedDH = new DataHandler(dataSource);
        OMText textData = fac.createText(expectedDH, true);
        image.addChild(textData);

        OMElement imageName = fac.createOMElement("fileName", omNs);
        if (fileName != null) {
            imageName.setText(fileName);
View Full Code Here

        OMElement data = fac.createOMElement("Data", omNs);

        File dataFile = new File(fileName);
        FileDataSource dataSource = new FileDataSource(dataFile);
        expectedDH = new DataHandler(dataSource);
        OMText textData = fac.createText(expectedDH, true);
        data.addChild(textData);
        return data;
    }

    public OMElement testEchoXMLSync(String fileName) throws Exception {
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";

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

    assertEquals("Text value mismatch", tempText, textNode.getText());
  }

  public void testAppendText() {
View Full Code Here

    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
        .getText());
View Full Code Here

    String prefix = "axis2";
    String tempText = "The quick brown fox jumps over the lazy dog";
    String textToAppend = " followed by another";
   
    OMElement elem = factory.createOMElement(localName,namespace,prefix);
    OMText textNode = factory.createText(elem,tempText);
   
    ((Text)textNode).appendData(textToAppend);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try {
      elem.serialize(baos);
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.