Package org.apache.axis2.soap

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


    }

    public void testSendingMustUnderstandWithNextRole() throws Exception {
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        SOAPEnvelope envelope = fac.getDefaultEnvelope();
        OMNamespace headerNs = fac.createOMNamespace("http://dummyHeader", "dh");
        SOAPHeaderBlock h1 =
            fac.createSOAPHeaderBlock("DummyHeader", headerNs, envelope.getHeader());
        h1.setMustUnderstand(true);
        h1.addChild(fac.createText("Dummy String"));
        h1.setRole(SOAP12Constants.SOAP_ROLE_NEXT);
View Full Code Here


        call.close();
    }

    public void testDispatchWithURLAndSOAPAction() throws Exception {
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
        OMNamespace omNs = fac.createOMNamespace("http://dummyURL", "my");
        OMElement payload = fac.createOMElement("echoOMElementRequest", omNs);
        OMElement value = fac.createOMElement("myValue", omNs);
        value.addChild(
                fac.createText(value, "Isaac Assimov, the foundation Sega"));
        payload.addChild(value);
View Full Code Here

    }

    public void testDispatchWithSOAPBody() throws Exception {
        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();

        OMNamespace omNs = fac.createOMNamespace(
                "http://127.0.0.1:5555/axis/services/EchoXMLService", "my");
        OMElement payload = fac.createOMElement("echoOMElement", omNs);
        OMElement value = fac.createOMElement("myValue", omNs);
        value.addChild(
                fac.createText(value, "Isaac Assimov, the foundation Sega"));
View Full Code Here

        call.setWsaAction(operationName.getLocalPart());

        SOAPEnvelope result = call.invokeBlocking(operationName.getLocalPart(), payload);


        OMNamespace axis2Namespace = fac.createOMNamespace(Constants.AXIS2_NAMESPACE_URI,
                                                           Constants.AXIS2_NAMESPACE_PREFIX);
        SOAPEnvelope defaultEnvelope = fac.getDefaultEnvelope();
        SOAPHeaderBlock soapHeaderBlock = defaultEnvelope.getHeader().addHeaderBlock(Constants.SERVICE_GROUP_ID,
                                                                                     axis2Namespace);
View Full Code Here

    private void callTheService() throws Exception {
        try {
            SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();

            OMNamespace omNs = fac.createOMNamespace("http://localhost/my",
                    "my");
            OMElement method = fac.createOMElement("echoOMElement", omNs);
            OMElement value = fac.createOMElement("myValue", omNs);
            value.setText("Isaac Assimov, the foundation Sega");
            method.addChild(value);
View Full Code Here

            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

                }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

                }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

        options.setAction(operationName.getLocalPart());

        SOAPEnvelope result = call.invokeBlocking(operationName.getLocalPart(), payload);


        OMNamespace axis2Namespace = fac.createOMNamespace(Constants.AXIS2_NAMESPACE_URI,
                Constants.AXIS2_NAMESPACE_PREFIX);
        SOAPEnvelope defaultEnvelope = fac.getDefaultEnvelope();
        SOAPHeaderBlock soapHeaderBlock = defaultEnvelope.getHeader().addHeaderBlock(Constants.SERVICE_GROUP_ID,
                axis2Namespace);
View Full Code Here

    private void callTheService() throws Exception {
        try {
            SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();

            OMNamespace omNs = fac.createOMNamespace("http://localhost/my",
                    "my");
            OMElement method = fac.createOMElement("echoOMElement", omNs);
            OMElement value = fac.createOMElement("myValue", omNs);
            value.setText("Isaac Assimov, the foundation Sega");
            method.addChild(value);
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.