Package org.apache.ws.commons.om

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


    public OMElement buildOM() throws XMLStreamException {
        XMLStreamReader xmlReader =
                XMLInputFactory.newInstance().createXMLStreamReader(descriptionStream);
        OMFactory fac = OMAbstractFactory.getOMFactory();
        StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
        OMElement element = staxOMBuilder.getDocumentElement();

        element.build();

        return element;
    }
View Full Code Here


      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));
    return resultElem;
  }
View Full Code Here

      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));
    return resultElem;
  }
View Full Code Here

      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));
    return resultElem;
  }
View Full Code Here

      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));
    return resultElem;
  }
View Full Code Here

    public static void printResult(SOAPEnvelope result) {
        try {
            XMLStreamWriter writer = XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(System.out);
            if (result != null) {
                OMElement resultOM = result.getBody().getFirstChildWithName(new QName("result"));
                System.out.println("Result is:" + resultOM.getText());
            } else
                System.out.println("Result is null");
        } catch (XMLStreamException e) {
            e.printStackTrace();
        } catch (FactoryConfigurationError e) {
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);
        params.addChild(param2OM);
        envelope.getBody().setFirstChild(params);

        if (groupContextId != null) {
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);

        if (groupContextId != null) {
            OMNamespace axis2Namespace = fac.createOMNamespace(
View Full Code Here

      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));
    return resultElem;
  }
View Full Code Here

      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));
    return resultElem;
  }
View Full Code Here

TOP

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

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.