Package org.apache.axis2.soap

Examples of org.apache.axis2.soap.SOAPFactory.createOMNamespace()


            String operation = values[1];
            SOAPFactory soapFactory = new SOAP11Factory();
            SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();

            OMNamespace omNs =
                soapFactory.createOMNamespace(values[0], "services");
            OMNamespace defualtNs = new OMNamespaceImpl("", null);

            OMElement opElement = soapFactory.createOMElement(operation, omNs);

            Iterator it = map.keySet().iterator();
View Full Code Here


        return b;
    }

    public OMElement echoOM(OMElement b) {
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        OMNamespace ns = fac.createOMNamespace(
                "http://soapenc/", "res");
        OMElement bodyContent = fac.createOMElement(
                "echoOMResponse", ns);
        OMElement child = fac.createOMElement("return", null);
        child.addChild(fac.createText(child, b.getText()));
View Full Code Here

        return in;
    }

    public OMElement multireturn(OMElement ele) throws XMLStreamException {
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "res");
        OMElement method = fac.createOMElement("multiretuenResponse", omNs);
        OMElement value1 = fac.createOMElement("return0", null);
        value1.addChild(
                fac.createText(value1, "10"));
        method.addChild(value1);
View Full Code Here

        this.observer = observer;
    }

    private OMElement getElement(String word) {
        SOAPFactory omfactory = OMAbstractFactory.getSOAP11Factory();
        OMNamespace opN = omfactory.createOMNamespace("urn:GoogleSearch",
                "ns1");
        OMNamespace emptyNs = omfactory.createOMNamespace("", null);

        OMElement method = omfactory.createOMElement("doSpellingSuggestion",
                opN);
View Full Code Here

    private OMElement getElement(String word) {
        SOAPFactory omfactory = OMAbstractFactory.getSOAP11Factory();
        OMNamespace opN = omfactory.createOMNamespace("urn:GoogleSearch",
                "ns1");
        OMNamespace emptyNs = omfactory.createOMNamespace("", null);

        OMElement method = omfactory.createOMElement("doSpellingSuggestion",
                opN);
        method.declareNamespace("http://www.w3.org/1999/XMLSchema-instance",
                "xsi");
View Full Code Here

                }else{
                    fac = OMAbstractFactory.getSOAP12Factory();
                }
                SOAPEnvelope envelope = fac.getDefaultEnvelope();
                OMNamespace ns =
                    fac.createOMNamespace("http://soapenc/", "res");
                OMElement responseElement =
                    fac.createOMElement(methodName + "Response", ns);
                String outMessageString = obj.toString();
                // System.out.println("outMessageString = " + outMessageString);
                // responseElement.setText(outMessageString);
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);
View Full Code Here

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

        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

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.