Examples of AxisCallback


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

            new QName(rmNamespaceValue,
                Sandesha2Constants.WSRM_COMMON.TERMINATE_SEQUENCE));

        // To inform the Sandesha2 out handler. The response to this call needs
        // be routed to the Sandesha Message receiver
        AxisCallback callback = new AxisCallback() {

          public void onMessage(MessageContext msg) {
            try {
              RMMessageReceiver rm = new RMMessageReceiver();
              rm.receive(msg);
View Full Code Here

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

        } else if (messageCtx.getProperty(SandeshaClientConstants.SEQUENCE_KEY) == null) {
            messageID = (String) messageCtx.getProperty(SynapseConstants.RELATES_TO_FOR_POX);
        }

        if (messageID != null) {
            AxisCallback callback = (AxisCallback) callbackStore.remove(messageID);

            RelatesTo[] relates = messageCtx.getRelationships();
            if (relates != null && relates.length > 1) {
                // we set a relates to to the response message so that if WSA is not used, we
                // could still link back to the original message. But if WSA was used, this
View Full Code Here

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

        if (callbackObj == null) {
            throw new AxisFault("The Callback for MessageID " + messageID + " was not found");
        }

        if (callbackObj instanceof AxisCallback) {
            AxisCallback axisCallback = (AxisCallback)callbackObj;
            if (msgContext.isFault()) {
                axisCallback.onFault(msgContext);
            } else {
                axisCallback.onMessage(msgContext);
            }
            // Either way we're done.
            axisCallback.onComplete();
            return;
        }

        // THIS NEXT PART WILL EVENTUALLY GO AWAY WHEN Callback DOES
View Full Code Here

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

            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);
            options.setAction(operationName.getLocalPart());

            AxisCallback callback = new AxisCallback() {

                /**
                 * This is called when we receive a message.
                 *
                 * @param msgContext the (response) MessageContext
                 */
                public void onMessage(MessageContext msgContext) {
                    OMElement result = msgContext.getEnvelope().getBody().getFirstElement();
                    TestingUtils.compareWithCreatedOMElement(result);
                    log.debug("result = " + result);
                }

                /**
                 * This gets called when a fault message is received.
                 *
                 * @param msgContext the MessageContext containing the fault.
                 */
                public void onFault(MessageContext msgContext) {
                    fail("Fault received");
                }


                /**
                 * This gets called ONLY when an internal processing exception occurs.
                 *
                 * @param e the Exception which caused the problem
                 */
                public void onError(Exception e) {
                }

                /** This is called at the end of the MEP no matter what happens, quite like a finally block. */
                public void onComplete() {
                    finish = true;
                    notify();
                }
            };

            sender = new ServiceClient(configcontext, service);
            sender.setOptions(options);

            sender.sendReceiveNonBlocking(operationName, method, callback);
            log.info("send the request");
            synchronized (callback) {
                if (!finish) {
                    callback.wait(45000);
                    if (!finish) {
                        throw new AxisFault(
                                "Server was shutdown as the async response take too long to complete");
                    }
                }
View Full Code Here

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

        if (callbackObj == null) {
            throw new AxisFault("The Callback for MessageID " + messageID + " was not found");
        }

        if (callbackObj instanceof AxisCallback) {
            AxisCallback axisCallback = (AxisCallback)callbackObj;
            if (msgContext.isFault()) {
                axisCallback.onFault(msgContext);
            } else {
                axisCallback.onMessage(msgContext);
            }
            // Either way we're done.
            axisCallback.onComplete();
            return;
        }
     
    }
View Full Code Here

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

        if (callbackObj == null) {
            throw new AxisFault("The Callback for MessageID " + messageID + " was not found");
        }

        if (callbackObj instanceof AxisCallback) {
            AxisCallback axisCallback = (AxisCallback)callbackObj;
            if (msgContext.isFault()) {
                axisCallback.onFault(msgContext);
            } else {
                axisCallback.onMessage(msgContext);
            }
            // Either way we're done.
            axisCallback.onComplete();
            return;
        }

        // THIS NEXT PART WILL EVENTUALLY GO AWAY WHEN Callback DOES
View Full Code Here

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

                                Boolean.TRUE);
            options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
                                Boolean.TRUE);
//            options.setProperty(ServiceClient.AUTO_OPERATION_CLEANUP, true);

            AxisCallback callback = new AxisCallback() {

                public void onMessage(MessageContext msgContext) {
                    final OMElement responseElement =
                            msgContext.getEnvelope().getBody().getFirstElement();
                    assertNotNull(responseElement);
View Full Code Here

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

            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);
            options.setAction(operationName.getLocalPart());

            AxisCallback callback = new AxisCallback() {

                /**
                 * This is called when we receive a message.
                 *
                 * @param msgContext the (response) MessageContext
                 */
                public void onMessage(MessageContext msgContext) {
                    OMElement result = msgContext.getEnvelope().getBody().getFirstElement();
                    TestingUtils.compareWithCreatedOMElement(result);
                    log.debug("result = " + result);
                }

                /**
                 * This gets called when a fault message is received.
                 *
                 * @param msgContext the MessageContext containing the fault.
                 */
                public void onFault(MessageContext msgContext) {
                    fail("Fault received");
                }


                /**
                 * This gets called ONLY when an internal processing exception occurs.
                 *
                 * @param e the Exception which caused the problem
                 */
                public void onError(Exception e) {
                }

                /** This is called at the end of the MEP no matter what happens, quite like a finally block. */
                public void onComplete() {
                    finish = true;
                    notify();
                }
            };

            sender = new ServiceClient(configcontext, service);
            sender.setOptions(options);

            sender.sendReceiveNonBlocking(operationName, method, callback);
            log.info("send the request");
            synchronized (callback) {
                if (!finish) {
                    callback.wait(45000);
                    if (!finish) {
                        throw new AxisFault(
                                "Server was shutdown as the async response take too long to complete");
                    }
                }
View Full Code Here

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

        if (callbackObj == null) {
            throw new AxisFault("The Callback for MessageID " + messageID + " was not found");
        }

        if (callbackObj instanceof AxisCallback) {
            AxisCallback axisCallback = (AxisCallback)callbackObj;
            if (msgContext.isFault()) {
                axisCallback.onFault(msgContext);
            } else {
                axisCallback.onMessage(msgContext);
            }
            // Either way we're done.
            axisCallback.onComplete();
            return;
        }

        // THIS NEXT PART WILL EVENTUALLY GO AWAY WHEN Callback DOES
View Full Code Here

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

        sender.setOptions(options);
        options.setAction("urn:echoOMElement");
        options.setTo(targetEPR);
        for (int i = 0; i < 5; i++) {
           
            AxisCallback callback = new AxisCallback() {
               
                public void onMessage(MessageContext msgContext) {
                    TestingUtils.compareWithCreatedOMElement(
                            msgContext.getEnvelope()
                                    .getBody().getFirstElement());
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.