Package org.apache.ws.commons.om

Examples of org.apache.ws.commons.om.OMNamespace


      System.out.println ("ServiceGroupContextID:" + msgContext.getServiceGroupContextId());
    else
      System.out.println ("Message Context is null");
   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace("http://axis2/test/namespace1","ns1");
   
    OMElement resultElem = fac.createOMElement("result",namespace);
    resultElem.setText(Integer.toString(result ));
   
    msgContext.getServiceGroupContext().setProperty(Constants.CALCULATOR_PREVIOUS_KEY,Integer.toString(result));
View Full Code Here


      System.out.println ("ServiceGroupContextID:" + msgContext.getServiceGroupContextId());
    else
      System.out.println ("Message Context is null");
   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace("http://axis2/test/namespace1","ns1");
   
    OMElement resultElem = fac.createOMElement("result",namespace);
    resultElem.setText(Integer.toString(result ));
   
    msgContext.getServiceGroupContext().setProperty(Constants.CALCULATOR_PREVIOUS_KEY,Integer.toString(result));
View Full Code Here

      System.out.println ("ServiceGroupContextID:" + msgContext.getServiceGroupContextId());
    else
      System.out.println ("Message Context is null");
   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace("http://axis2/test/namespace1","ns1");
   
    OMElement resultElem = fac.createOMElement("result",namespace);
    resultElem.setText(Integer.toString(result ));
   
    msgContext.getServiceGroupContext().setProperty(Constants.CALCULATOR_PREVIOUS_KEY,Integer.toString(result));
View Full Code Here

      System.out.println ("ServiceGroupContextID:" + msgContext.getServiceGroupContextId());
    else
      System.out.println ("Message Context is null");
   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace("http://axis2/test/namespace1","ns1");
   
    OMElement resultElem = fac.createOMElement("result",namespace);
    resultElem.setText(Integer.toString(result ));
   
    msgContext.getServiceGroupContext().setProperty(Constants.CALCULATOR_PREVIOUS_KEY,Integer.toString(result));
View Full Code Here

    public static SOAPEnvelope getRequestEnvelope(String operationName,
                                                  int param1, int param2, String groupContextId) {
        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);
        params.addChild(param2OM);
        envelope.getBody().setFirstChild(params);

        if (groupContextId != null) {
            OMNamespace axis2Namespace = fac.createOMNamespace(
                    Constants.AXIS2_NAMESPACE_URI,
                    Constants.AXIS2_NAMESPACE_PREFIX);
            SOAPHeaderBlock soapHeaderBlock = envelope.getHeader()
                    .addHeaderBlock(Constants.SERVICE_GROUP_ID, axis2Namespace);
            soapHeaderBlock.setText(groupContextId);
View Full Code Here

    public static SOAPEnvelope getPreviousRequestEnvelope(String operationName,
                                                          int param, String groupContextId) {
        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);

        if (groupContextId != null) {
            OMNamespace axis2Namespace = fac.createOMNamespace(
                    Constants.AXIS2_NAMESPACE_URI,
                    Constants.AXIS2_NAMESPACE_PREFIX);
            SOAPHeaderBlock soapHeaderBlock = envelope.getHeader()
                    .addHeaderBlock(Constants.SERVICE_GROUP_ID, axis2Namespace);
            soapHeaderBlock.setText(groupContextId);
View Full Code Here

      System.out.println ("ServiceGroupContextID:" + msgContext.getServiceGroupContextId());
    else
      System.out.println ("Message Context is null");
   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace("http://axis2/test/namespace1","ns1");
   
    OMElement resultElem = fac.createOMElement("result",namespace);
    resultElem.setText(Integer.toString(result ));
   
    msgContext.getServiceGroupContext().setProperty(Constants.CALCULATOR_PREVIOUS_KEY,Integer.toString(result));
View Full Code Here

      System.out.println ("ServiceGroupContextID:" + msgContext.getServiceGroupContextId());
    else
      System.out.println ("Message Context is null");
   
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace("http://axis2/test/namespace1","ns1");
   
    OMElement resultElem = fac.createOMElement("result",namespace);
    resultElem.setText(Integer.toString(result ));
   
    msgContext.getServiceGroupContext().setProperty(Constants.CALCULATOR_PREVIOUS_KEY,Integer.toString(result));
View Full Code Here

    }


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

Related Classes of org.apache.ws.commons.om.OMNamespace

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.