Package org.apache.axis2.client

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


            }

            OMElement result = null;
            try {
                options.setCallTransportCleanup(true);
                result = sc.sendReceive(request);
            } catch (AxisFault axisFault) {
                handleFault(synCtx, axisFault);
            }

            if (synLog.isTraceTraceEnabled()) {
View Full Code Here


        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_FALSE);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

        ServiceClient sender = new ServiceClient();
        sender.setOptions(options);
        return sender.sendReceive(payload);
    }

    public void setTargetEPR(String targetEPR) {
        this.targetEPR = new EndpointReference(targetEPR);
    }
View Full Code Here

   
    serviceClient.setOptions(clientOptions);

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

    clientOptions.setTimeOutInMilliSeconds(10000);
   
    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");
    result = serviceClient.sendReceive(getEchoOMBlock("echo5",sequenceKey));
    showResult(result);
View Full Code Here

   
    result = serviceClient.sendReceive(getEchoOMBlock("echo4",sequenceKey));
    showResult(result);
   
    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
    result = serviceClient.sendReceive(getEchoOMBlock("echo5",sequenceKey));
    showResult(result);
           
        Thread.sleep(4000);
  }
View Full Code Here

    ServiceClient client = new ServiceClient();
    client.getOptions().setTo(new EndpointReference(mesgboxUrl));
   
    OMElement request = OMAbstractFactory.getOMFactory().createOMElement(new QName("foo"));
    request.setText("bar");
    client.sendReceive(request);
   
    iterator = user.takeMessagesFromMsgBox(new EndpointReference(mesgboxUrl),500L);
    assertTrue(iterator.hasNext());
    iterator.next();
    assertFalse(iterator.hasNext());
View Full Code Here

    OMElement message = createMessageEl(this.msgBoxId);
    ServiceClient serviceClient = createServiceClient(message);

    OMElement responseMessage = null;
    try {
      responseMessage = serviceClient.sendReceive(message);
    } finally {
      serviceClient.cleanupTransport();
    }

    responseMessage = serviceClient.sendReceive(message);
View Full Code Here

      responseMessage = serviceClient.sendReceive(message);
    } finally {
      serviceClient.cleanupTransport();
    }

    responseMessage = serviceClient.sendReceive(message);
    if (responseMessage == null) {
      throw AxisFault.makeFault(new RuntimeException(
          "no response recieved for subscription message"));
    }
    return responseMessage.getFirstElement().getText();
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.