Package org.apache.axis2.client

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


            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

    showResult(result);
   
    result = serviceClient.sendReceive (getEchoOMBlock("echo2",sequenceKey));
    showResult(result);
   
    result = serviceClient.sendReceive(getEchoOMBlock("echo3",sequenceKey));
    showResult(result);
   
    result = serviceClient.sendReceive(getEchoOMBlock("echo4",sequenceKey));
    showResult(result);
   
View Full Code Here

    showResult(result);
   
    result = serviceClient.sendReceive(getEchoOMBlock("echo3",sequenceKey));
    showResult(result);
   
    result = serviceClient.sendReceive(getEchoOMBlock("echo4",sequenceKey));
    showResult(result);
   
    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
    OMElement bodyElem = getEchoOMBlock("echo5",sequenceKey);
   
View Full Code Here

    showResult(result);
   
    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
    OMElement bodyElem = getEchoOMBlock("echo5",sequenceKey);
   
    result = serviceClient.sendReceive(bodyElem);
    showResult(result);
           
        Thread.sleep(4000);
  }
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.