Package org.apache.axis2.om

Examples of org.apache.axis2.om.OMFactory


        responseText = tempText;
    }

    System.out.println("echoString got text:"
        + ((null == responseText) ? "" : responseText));
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace omNs = fac.createOMNamespace("http://tempuri.org/",
        "echoString");
    OMElement method = fac.createOMElement("echoStringResponse", omNs);

    OMElement value = fac.createOMElement("text", omNs);

    if (responseText == null || "".equals(responseText))
      responseText = "echo response";

    value.setText(responseText);
View Full Code Here


    clientOptions.setProperty(ClientAPI.LAST_MESSAGE, "true");
    sender.send("ping",getPingOMBlock("Microsoft-3"));
  }
 
  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);

    return pingElement;
  }
View Full Code Here

    clientOptions.setProperty(ClientAPI.LAST_MESSAGE, "true");
    sender.send("ping",getPingOMBlock("Microsoft-3"));
  }
 
  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);

    return pingElement;
  }
View Full Code Here

    sender.send("ping",getPingOMBlock("ping3"));

  }
 
  private static OMElement getPingOMBlock(String text) {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace ns = fac.createOMNamespace("http://tempuri.apache.org",
        "ns1");
    OMElement pingElement = fac.createOMElement("ping", ns);
    OMElement paramElement = fac.createOMElement("param1", ns);
    pingElement.addChild(paramElement);
    paramElement.setText(text);

    return pingElement;
  }
View Full Code Here

        msgSender.setSenderTransport(Constants.TRANSPORT_MAIL);
        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);

        return method;
    }
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);

        return method;
  }
View Full Code Here

        method.addChild(value);

        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);

        return method;
    }
View Full Code Here

        .getInputStream());
    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

* Time: 1:19:11 PM
*/
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

        Image actualObject = new ImageIO().loadImage(actualDH.getDataSource()
                .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

TOP

Related Classes of org.apache.axis2.om.OMFactory

Copyright © 2018 www.massapicom. 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.