Package org.apache.axis2.om

Examples of org.apache.axis2.om.OMElement


        reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
        reqEnv.declareNamespace("http://soapinterop.org/", "tns");
        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/", "wsdl");

        OMElement operation = omfactory.createOMElement("echoStruct", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);
        OMElement part = omfactory.createOMElement("inputStruct", "", null);
        part.addAttribute("xsi:type", "xsd:SOAPStruct", null);

        OMElement value0 = omfactory.createOMElement("varString", "", null);
        value0.addAttribute("xsi:type", "xsd:string", null);
        value0.addChild(omfactory.createText("strss fdfing1"));
        OMElement value1 = omfactory.createOMElement("varInt", "", null);
        value1.addAttribute("xsi:type", "xsd:int", null);
        value1.addChild(omfactory.createText("25"));
        OMElement value2 = omfactory.createOMElement("varFloat", "", null);
        value2.addAttribute("xsi:type", "xsd:float", null);
        value2.addChild(omfactory.createText("25.23"));

        part.addChild(value0);
        part.addChild(value1);
        part.addChild(value2);
View Full Code Here


            reqEnv.declareNamespace("http://soapinterop.org/", "tns");
            reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
            reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/", "wsdl");
            reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance","xsi");

        OMElement operation = omfactory.createOMElement("echo2DStringArray", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);

        OMElement part = omfactory.createOMElement("input2DStringArray", "", null);
        part.addAttribute("xsi:type", "SOAP-ENC:Array", null);
        part.addAttribute("SOAP-ENC:arrayType", "xsd:string[2,2]", null);

        OMElement value0 = omfactory.createOMElement("varString", "", null);
        value0.addAttribute("xsi:type", "xsd:string", null);
        value0.addChild(omfactory.createText("strss fdfing1"));
        OMElement value1 = omfactory.createOMElement("varString", "", null);
        value1.addAttribute("xsi:type", "xsd:string", null);
        value1.addChild(omfactory.createText("sdfsdf25"));
        OMElement value2 = omfactory.createOMElement("varString", "", null);
        value2.addAttribute("xsi:type", "xsd:string", null);
        value2.addChild(omfactory.createText("25dsasd dfasdas23"));
        OMElement value3 = omfactory.createOMElement("varString", "", null);
        value3.addAttribute("xsi:type", "xsd:string", null);
        value3.addChild(omfactory.createText("25dsasd dfasdas23"));

        part.addChild(value0);
        part.addChild(value1);
        part.addChild(value2);
        part.addChild(value3);
View Full Code Here

        SOAPHeader header = omfactory.createSOAPHeader(reqEnv);
        OMNamespace ns = header.declareNamespace("http://soapinterop.org/xsd", "ns0");
        header.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);
        SOAPHeaderBlock blk1 = header.addHeaderBlock("Header1", ns);
        OMElement h1Value1 = omfactory.createOMElement("string", ns);
        h1Value1.addChild(omfactory.createText("String at header1"));
        OMElement h1Value2 = omfactory.createOMElement("int", ns);
        h1Value2.addChild(omfactory.createText("561565"));
        blk1.addChild(h1Value1);
        blk1.addChild(h1Value2);

        SOAPHeaderBlock blk2 = header.addHeaderBlock("Header2", ns);
        OMElement h2Value1 = omfactory.createOMElement("string", ns);
        h2Value1.addChild(omfactory.createText("String at header2"));
        OMElement h2Value2 = omfactory.createOMElement("int", ns);
        h2Value2.addChild(omfactory.createText("55"));
        blk2.addChild(h2Value2);
        blk2.addChild(h2Value1);

        OMElement operation = omfactory.createOMElement("echoStringParam", "http://soapinterop.org/xsd", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addChild(omfactory.createText("apache axis2"));
        return reqEnv;

    }
View Full Code Here

        reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
        reqEnv.declareNamespace("http://soapinterop.org/", "tns");
        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/", "wsdl");

        OMElement operation = omfactory.createOMElement("echoFloatArray", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);

        OMElement part = omfactory.createOMElement("inputFloatArray", "", null);
        part.addAttribute("xsi:type", "xsd:int", null);
        part.addAttribute("xsi:type", "SOAP-ENC:Array", null);
        part.addAttribute("SOAP-ENC:arrayType", "xsd:float[3]", null);

        OMElement value0 = omfactory.createOMElement("varString", "", null);
        value0.addAttribute("xsi:type", "xsd:float", null);
        value0.addChild(omfactory.createText("45.76876"));
        OMElement value1 = omfactory.createOMElement("varInt", "", null);
        value1.addAttribute("xsi:type", "xsd:float", null);
        value1.addChild(omfactory.createText("43.454"));
        OMElement value2 = omfactory.createOMElement("varFloat", "", null);
        value2.addAttribute("xsi:type", "xsd:float", null);
        value2.addChild(omfactory.createText("2523.542"));

        part.addChild(value0);
        part.addChild(value1);
        part.addChild(value2);
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();

        OMNamespace omNs = fac.createOMNamespace("http://soapinterop.org/wsdl", "m");

        OMElement method = fac.createOMElement("echoMultipleFaults2", omNs);
        OMNamespace soapEnvNS = method.declareNamespace(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
        method.addAttribute("encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", soapEnvNS);

        OMNamespace xsiNs = method.declareNamespace("http://www.w3.org/2001/XMLSchema-instance","xsi");
        OMNamespace ns2 = method.declareNamespace("http://soapinterop.org/types","ns2");
        method.declareNamespace("http://schemas.xmlsoap.org/wsdl/","wsdl");

        OMElement value = fac.createOMElement("whichFault", null);
        method.addChild(value);
        OMElement value1 = fac.createOMElement("param1", null);
        OMElement value2 = fac.createOMElement("param2", null);
        OMElement value3 = fac.createOMElement("param3", null);
        OMElement value4 = fac.createOMElement("Item", null);
        OMElement value5 = fac.createOMElement("Item", null);
        OMElement value6 = fac.createOMElement("Item", null);

        value3.addAttribute("soapenc:arrayType","nsa:string[3]",null);
        value3.addAttribute("soapenc:offset","[0]",null);
        value3.addAttribute("xmlns:soapenc","http://schemas.xmlsoap.org/soap/encoding/",null);
        value3.addAttribute("xmlns:nsa","http://www.w3.org/2001/XMLSchema",null);


        value.addChild(fac.createText(value, "2"));
        value1.addChild(fac.createText(value1, "hi"));
        value2.addChild(fac.createText(value2, "0.23"));
        value4.addChild(fac.createText(value4, "String 1"));
        value5.addChild(fac.createText(value5, "String 2"));
        value6.addChild(fac.createText(value6, "String 3"));

        value3.addChild(value4);
        value3.addChild(value5);
        value3.addChild(value6);
View Full Code Here

        reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
        reqEnv.declareNamespace("http://www.w3.org/1999/XMLSchema-instance/", "xsi");
        reqEnv.declareNamespace("http://www.w3.org/1999/XMLSchema", "xsd");


        OMElement method = omFactory.createOMElement("echoString", "http://soapinterop.org/", null);
        reqEnv.getBody().addChild(method);
        method.addAttribute("encordingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);

        OMElement value = omFactory.createOMElement("inputString", "http://soapinterop.org/", null);
        value.addAttribute("xsi:type", "xsd:string", null);
        value.addChild(omFactory.createText("Lanka Software Foundation"));
        method.addChild(value);

        return reqEnv;
    }
View Full Code Here

        header.addChild(block1);

        SOAPHeaderBlock block2 = header.addHeaderBlock("echoMeStructRequest", hns);
        block2.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement h2Val1 = omfactory.createOMElement("varString", null);
        h2Val1.addAttribute("xsi:type", "xsd:string", null);
        h2Val1.addChild(omfactory.createText("string"));

        OMElement h2Val2 = omfactory.createOMElement("varInt", null);
        h2Val2.addAttribute("xsi:type", "xsd:int", null);
        h2Val2.addChild(omfactory.createText("150"));

        OMElement h2Val3 = omfactory.createOMElement("varFloat", null);
        h2Val3.addAttribute("xsi:type", "xsd:float", null);
        h2Val3.addChild(omfactory.createText("456.321"));

        block2.addChild(h2Val1);
        block2.addChild(h2Val2);
        block2.addChild(h2Val3);

        OMElement operation = omfactory.createOMElement("echoFloat", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);

        OMElement part = omfactory.createOMElement("inputFloat", "", null);
        part.addAttribute("xsi:type", "xsd:float", null);
        part.addChild(omfactory.createText("50.25"));

        operation.addChild(part);
        //reqEnv.getBody().addChild(method);
        return reqEnv;
View Full Code Here

        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/", "wsdl");
        reqEnv.declareNamespace("http://soapinterop/","ns1");
        reqEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance","xsi");

        OMElement operation = omfactory.createOMElement("echoStruct", "http://soapinterop/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);

        OMElement part = omfactory.createOMElement("inputStruct", "", null);
        part.addAttribute("xsi:type", "s:SOAPStruct", null);

        OMElement value0 = omfactory.createOMElement("varString", "", null);
        value0.addAttribute("xsi:type", "xsd:string", null);
        value0.addChild(omfactory.createText("strss fdfing1"));
        OMElement value1 = omfactory.createOMElement("varInt", "", null);
        value1.addAttribute("xsi:type", "xsd:int", null);
        value1.addChild(omfactory.createText("25"));
        OMElement value2 = omfactory.createOMElement("varFloat", "", null);
        value2.addAttribute("xsi:type", "xsd:float", null);
        value2.addChild(omfactory.createText("25.23"));
        part.addChild(value0);
        part.addChild(value1);
        part.addChild(value2);
        operation.addChild(part);
        //reqEnv.getBody().addChild(method);
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();

        OMNamespace omNs = fac.createOMNamespace("http://soapinterop.org/wsdl", "m");

        OMElement method = fac.createOMElement("echoMultipleFaults3", omNs);
        OMNamespace soapEnvNS = method.declareNamespace(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
        method.addAttribute("encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", soapEnvNS);

        OMNamespace xsiNs = method.declareNamespace("http://www.w3.org/2001/XMLSchema-instance","xsi");
        OMNamespace ns2 = method.declareNamespace("http://soapinterop.org/types","ns2");
        method.declareNamespace("http://schemas.xmlsoap.org/wsdl/","wsdl");

        OMElement value = fac.createOMElement("whichFault", null);
        method.addChild(value);
        OMElement value1 = fac.createOMElement("param1", null);
        OMElement value2 = fac.createOMElement("param2", null);



        value.addChild(fac.createText(value, "3"));
        value1.addChild(fac.createText(value1, "param 1"));
        value2.addChild(fac.createText(value2, "Param 2"));




View Full Code Here

        reqEnv.declareNamespace("http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENC");
        reqEnv.declareNamespace("http://soapinterop.org/", "tns");
        reqEnv.declareNamespace("http://soapinterop.org/xsd", "s");
        reqEnv.declareNamespace("http://schemas.xmlsoap.org/wsdl/", "wsdl");

        OMElement operation = omfactory.createOMElement("echoInteger", "http://soapinterop.org/", null);
        SOAPBody body = omfactory.createSOAPBody(reqEnv);
        body.addChild(operation);
        operation.addAttribute("soapenv:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/", null);

        OMElement part = omfactory.createOMElement("inputInteger", "", null);
        part.addAttribute("xsi:type", "xsd:int", null);
        part.addChild(omfactory.createText("52"));
        operation.addChild(part);
        return reqEnv;

    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.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.