Package org.apache.axis2.client

Examples of org.apache.axis2.client.RESTCall.sendReceive()


        options.setTo(new EndpointReference(targetEPR));
        options.setAction("urn:uploadFileUsingMTOM");
        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);

        serviceClient.setOptions(options);
        OMElement response = serviceClient.sendReceive(payload);

        OMText binaryNode = (OMText) response.
                getFirstChildWithName(new QName("http://services.samples", "response")).
                getFirstChildWithName(new QName("http://services.samples", "image")).
                getFirstOMChild();
View Full Code Here


                } catch (InterruptedException ignored) {
                }
            }

            client.getOptions().setManageSession(true);
            OMElement responseElement = client.sendReceive(value);
            String response = responseElement.getText();

            i++;
            System.out.println("Request: " + i + " ==> " + response);
            testString = testString.concat(":" + i + ">" + response + ":");
View Full Code Here

            serviceClient.sendReceiveNonBlocking(payload, new StockQuoteCallback());
            printResult();
        } else {
            long i = 0;
            while (i < iterations || infinite) {
                InnerStruct.RESULT = serviceClient.sendReceive(payload);
                i++;
                printResult();
                if (Boolean.parseBoolean(wsrm) || Boolean.parseBoolean(wsrm11)) {
                    // give some time for RM to terminate normally
                    if (Boolean.parseBoolean(wsrm11)){
View Full Code Here

            options.setAction("http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe");
            serviceClient.setOptions(options);
            System.out.println("Subscribing \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
                System.out.println("Subscribed to topic " + topic);
                Thread.sleep(1000);
                System.out.println("Response Received: " + response.toString());
                String subId =
                        response.getFirstChildWithName(
View Full Code Here

            factory.createOMText(identifierOm, identifier);
            serviceClient.addHeader(identifierOm);
            serviceClient.setOptions(options);
            System.out.println("UnSubscribing \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
                System.out.println("UnSubscribed to ID " + identifier);
                Thread.sleep(1000);
                System.out.println("UnSubscribe Response Received: " + response.toString());
            } catch (AxisFault e) {
                System.out.println("Fault Received : " + e.toString());
View Full Code Here

            factory.createOMText(identifierOm, identifier);
            serviceClient.addHeader(identifierOm);
            serviceClient.setOptions(options);
            System.out.println("SynapseSubscription Renew \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
                System.out.println("SynapseSubscription Renew to ID " + identifier);
                Thread.sleep(1000);
                System.out.println(
                        "SynapseSubscription Renew Response Received: " + response.toString());
            } catch (AxisFault e) {
View Full Code Here

            factory.createOMText(identifierOm, identifier);
            serviceClient.addHeader(identifierOm);
            serviceClient.setOptions(options);
            System.out.println("GetStatus using \n" + subscribeOm.toString());
            try {
                OMElement response = serviceClient.sendReceive(subscribeOm);
                System.out.println("GetStatus to ID " + identifier);
                Thread.sleep(1000);
                System.out.println("GetStatus Response Received: " + response.toString());
            } catch (AxisFault e) {
                System.out.println("Fault Received : " + e.toString());
View Full Code Here

        serviceClient.setOptions(options);
        OMElement payload =
                AXIOMUtil.stringToOM("<getQuote><request><symbol>" + symbol + "</symbol>" +
                        "</request></getQuote>");

        OMElement response = serviceClient.sendReceive(payload);
        if (response.getLocalName().equals("getQuoteResponse")) {
            OMElement last = response.getFirstElement().getFirstChildWithName(new QName("last"));
            System.out.println("Standard :: Stock price = $" + last.getText());
        } else {
            throw new Exception("Unexpected response : " + response);
View Full Code Here

   
    serviceClient.setOptions(clientOptions);

    clientOptions.setTimeOutInMilliSeconds(40000);
   
    OMElement result = serviceClient.sendReceive (getEchoOMBlock("echo1",sequenceKey));
    showResult(result);
   
    result = serviceClient.sendReceive (getEchoOMBlock("echo2",sequenceKey));
    showResult(result);
   
View Full Code Here

    clientOptions.setTimeOutInMilliSeconds(40000);
   
    OMElement result = serviceClient.sendReceive (getEchoOMBlock("echo1",sequenceKey));
    showResult(result);
   
    result = serviceClient.sendReceive (getEchoOMBlock("echo2",sequenceKey));
    showResult(result);
   
    result = serviceClient.sendReceive(getEchoOMBlock("echo3",sequenceKey));
    showResult(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.