Examples of AsyncResult


Examples of org.apache.axis2.client.async.AsyncResult

        // THIS NEXT PART WILL EVENTUALLY GO AWAY WHEN Callback DOES

        // OK, this must be an old-style Callback
        Callback callback = (Callback)callbackObj;
        AsyncResult result = new AsyncResult(msgContext);

        // check whether the result is a fault.
        try {
            SOAPEnvelope envelope = result.getResponseEnvelope();

            OperationContext opContext = msgContext.getOperationContext();
            if (opContext != null && !opContext.isComplete()) {
                opContext.addMessageContext(msgContext);
            }
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

                            axisCallback.onError(fault);
                        }

                    } else {
                        if (callback != null) {
                            AsyncResult asyncResult = new AsyncResult(response);
                            callback.onComplete(asyncResult);
                        } else if (axisCallback != null) {
                            axisCallback.onMessage(response);
                        }
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

                    } else {
                        //todo this needs to be fixed
                        callback.reportError(new Exception(body.getFault().getReason().getText()));
                    }
                } else {
                    AsyncResult asyncResult = new AsyncResult(response);
                    callback.onComplete(asyncResult);
                }

                callback.setComplete(true);
            } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

        RelatesTo relatesTO = messgeCtx.getMessageInformationHeaders()
                .getRelatesTo();

        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.get(messageID);
        AsyncResult result = new AsyncResult(messgeCtx);
        if (callback != null) {
            callback.onComplete(result);
            callback.setComplete(true);
        } else {
            throw new AxisFault(
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

                        } else {
                            callback.onError(new Exception(body.getFault()
                                    .getReason().getText()));
                        }
                    } else {
                        AsyncResult asyncResult = new AsyncResult(response);

                        callback.onComplete(asyncResult);
                    }
                }
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

    public void receive(MessageContext messageCtx) throws AxisFault {
        RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.get(messageID);
    AsyncResult result = new AsyncResult(messageCtx);

    if (callback != null) {
      try {
        // check weather the result is a fault.
        SOAPEnvelope envelope = result.getResponseEnvelope();
        SOAPFault fault = envelope.getBody().getFault();

        if (fault == null) {
          // if there is not fault call the onComplete method
          callback.onComplete(result);
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

                    } else {
                        callback.onError(new Exception(body.getFault()
                                .getReason().getText()));
                    }
                } else {
                    AsyncResult asyncResult = new AsyncResult(response);

                    callback.onComplete(asyncResult);
                }

                callback.setComplete(true);
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

    public void receive(MessageContext messageCtx) throws AxisFault {
        RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.get(messageID);
        AsyncResult result = new AsyncResult(messageCtx);

        if (callback != null) {
            callback.onComplete(result);
            callback.setComplete(true);
        } else {
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

                        // If a fault was found, create an AxisFault with a MessageContext so that
                        // other programming models can deserialize the fault to an alternative form.
                        AxisFault fault = new AxisFault(body.getFault(), response);
                        callback.onError(fault);
                    } else {
                        AsyncResult asyncResult = new AsyncResult(response);
                        callback.onComplete(asyncResult);
                    }
                }

            } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.client.async.AsyncResult

        if (relatesTO == null) {
            throw new AxisFault("Cannot identify correct Callback object. RelatesTo is null");
        }
        String messageID = relatesTO.getValue();
        Callback callback = (Callback) callbackStore.remove(messageID);
        AsyncResult result = new AsyncResult(messageCtx);

        if (callback == null) {
            throw new AxisFault("The Callback realtes to MessageID " + messageID + " is not found");
        }
       
        try {
            // check weather the result is a fault.
            SOAPEnvelope envelope = result.getResponseEnvelope();
            SOAPFault fault = envelope.getBody().getFault();

            if (fault == null) {
                // if there is not fault call the onComplete method
                callback.onComplete(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.