Package org.apache.axis2.om

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


 
  private static OMElement getPingOMBlock(String text) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace ns = fac.createOMNamespace("http://tempuri.org/",
        "ns1");
    OMNamespace defautNS = fac.createOMNamespace("",null);
    OMElement pingElement = fac.createOMElement("Ping", ns);
    OMElement paramElement = fac.createOMElement("Text", ns);
    pingElement.addChild(paramElement);
    paramElement.setText(text);
View Full Code Here


        msgSender.send("echo", getPayload());
    }

    private static OMElement getPayload() {
        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);
View Full Code Here

public class ClientUtil {

  public static OMElement getEchoOMElement(){
    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);
View Full Code Here

        return method;
  }
    public static OMElement getPingOMElement(){
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace("http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("ping", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Ping String "));
        method.addChild(value);
View Full Code Here

    FileOutputStream imageOutStream = new FileOutputStream(nameNode);
    new JDK13IO().saveImage("image/jpeg", actualObject, imageOutStream);
   
    //setting response
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace ns = fac.createOMNamespace("urn://fakenamespace", "ns");
    OMElement ele = fac.createOMElement("response", ns);
    ele.setText("Image Saved");
    return ele;
  }
}
View Full Code Here

*/
public class Version {

    public OMElement getVersion() {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
        OMElement version = fac.createOMElement("Version", omNs);
        version.addChild(fac.createText(version, "Hello I am Axis2 versionning service , My version is Axis2 M2 !! "));
        return version;
    }
}
View Full Code Here

                .getInputStream());
        FileOutputStream imageOutStream = new FileOutputStream(fileName);
        new ImageIO().saveImage("image/jpeg", actualObject, imageOutStream);
        //setting response
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace ns = fac.createOMNamespace("urn://fakenamespace", "ns");
        OMElement ele = fac.createOMElement("response", ns);
        ele.setText("Image Saved");
        return ele;
    }
}
View Full Code Here

    private OMElement createEnvelope(String fileName) throws Exception {

        DataHandler expectedDH;
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace("http://example.org/mtom/data", "x");
        OMElement data = fac.createOMElement("Data", omNs);
       
        File dataFile = new File(fileName);
        FileDataSource dataSource = new FileDataSource(dataFile);
        expectedDH = new DataHandler(dataSource);
View Full Code Here

    private OMElement createEnvelope(String fileName) throws Exception {

        DataHandler expectedDH;
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");

        OMElement data = fac.createOMElement("mtomSample", omNs);
        OMElement image = fac.createOMElement("image", omNs);
        Image expectedImage;
        expectedImage = new ImageIO()
View Full Code Here

    }


    private static OMElement getPayload() {
        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);
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.