Package org.apache.axis2.client

Examples of org.apache.axis2.client.Call.invokeBlocking()


            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(false);
            options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);

            //Blocking invocation
            OMElement result = call.invokeBlocking("echo", payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
            writer.flush();
View Full Code Here


        msgCtx.setEnvelope(reqEnv);


        QName opName = new QName("");
        AxisOperation opDesc = new OutInAxisOperation(opName);
        MessageContext retMsgCtx = call.invokeBlocking(opDesc, msgCtx);
        //SOAPEnvelope responseEnvelop = replyContext.getEnvelope();
        retEnv = retMsgCtx.getEnvelope();

        return retEnv;
    }
View Full Code Here

            MessageContext msgCtx = new MessageContext(configCtx);

            AxisOperation opDesc = new OutInAxisOperation(new QName(""));
            SOAPEnvelope requestEnvilope = util.getEchoSoapEnvelope();
            msgCtx.setEnvelope(requestEnvilope);
            MessageContext resMsgCtx = call.invokeBlocking(opDesc, msgCtx);
            retEnvelope = resMsgCtx.getEnvelope();

        } catch (Exception e) {
            throw new AxisFault(e);
        }
View Full Code Here

            ConfigurationContext configCtx = new ConfigurationContext(axisConfig);
            MessageContext msgCtx = new MessageContext(configCtx);
            AxisOperation opDesc = new OutInAxisOperation(new QName(""));
            SOAPEnvelope requestEnvilope = util.getEchoSoapEnvelope();
            msgCtx.setEnvelope(requestEnvilope);
            MessageContext responseMCtx = call.invokeBlocking(opDesc, msgCtx);
            resEnv = responseMCtx.getEnvelope();

        } catch (Exception e) {
            throw new AxisFault(e);
        }
View Full Code Here

            Call call =
                     new Call(clientHome);
            call.setClientOptions(clientOptions);
           
            OMElement result = call.invokeBlocking(operationName
                    .getLocalPart(), payload);

            OMElement data = (OMElement) result.getFirstOMChild();
            compareWithCreatedOMText(data.getText());
            call.close();
View Full Code Here

        options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET, Constants.VALUE_TRUE);

        Call call = new Call();
        call.setClientOptions(options);
        //if post is through GET of HTTP
        OMElement response = call.invokeBlocking("webSearch", data);
        response.serialize(System.out);
    }
}
View Full Code Here

                false);
        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);

        call.setClientOptions(options);
        OMElement result =
                call.invokeBlocking(operationName.getLocalPart(),
                        payload);
        result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(
                System.out));

View Full Code Here

        if (!args[0].equals("-N")) {
            env.getBody().addChild(getOMElementFromURL(args[2]));
        }

        SOAPEnvelope response = (SOAPEnvelope) call.invokeBlocking("foo", env);

        StringWriter sw = new StringWriter();
        OMElement result = response.getBody().getFirstElement();

        System.out.println("Output");
View Full Code Here

          opStr = "substract";
        }else if ("*".equals(operation)){
          opStr = "multiply";
        }
        System.out.println("Invoking...");
        SOAPEnvelope result = call.invokeBlocking(opStr,getRequestEnvelope(opStr,param1,param2,
            serviceGroupContextId));
        printResult(result);
       
        if (serviceGroupContextId==null)
          serviceGroupContextId = getServiceGroupContextId(result);
View Full Code Here

        }else if ("*".equals(operation)){
          opStr = "multiplyPrevious";
        }
       
        System.out.println("Invoking...");
        SOAPEnvelope result = call.invokeBlocking(opStr,getPreviousRequestEnvelope(opStr,param,
            serviceGroupContextId));
        printResult(result);
       
      }
     
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.