Examples of AxisCallback


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

            options.setAction("urn:echoOMElement");
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);
            options.setAction(Constants.AXIS2_NAMESPACE_URI + "/" + operationName.getLocalPart());
 
            AxisCallback callback = new AxisCallback() {
               
                public void onMessage(MessageContext msgContext) {
                    TestingUtils.compareWithCreatedOMElement(
                            msgContext.getEnvelope()
                                    .getBody().getFirstElement());
View Full Code Here

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

        Options options = new Options();
        options.setTo(targetEPR);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, MessageContext.UTF_16);

        AxisCallback callback = new AxisCallback() {
           
            public void onMessage(MessageContext msgContext) {
                SOAPEnvelope envelope = msgContext.getEnvelope();

                OMElement ele = (OMElement)envelope.getBody().getFirstElement().getFirstOMChild();
View Full Code Here

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

        OMElement payload = TestingUtils.createDummyOMElement();
        Options options = new Options();
        options.setTo(targetEPR);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

        AxisCallback callback = new AxisCallback() {
           
            public void onMessage(MessageContext msgContext) {
                TestingUtils.compareWithCreatedOMElement(
                        msgContext.getEnvelope().getBody().getFirstElement());
                finish = true;               
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() {
               
                public void onMessage(MessageContext msgContext) {
                    TestingUtils.compareWithCreatedOMElement(
                            msgContext.getEnvelope().getBody()
                                    .getFirstElement());
View Full Code Here

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

        Options clientOptions = new Options();
        clientOptions.setTo(targetEPR);
        clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);


        AxisCallback callback = new AxisCallback() {
           
            public void onMessage(MessageContext msgContext) {
                SOAPEnvelope envelope = msgContext.getEnvelope();

                OMElement data = (OMElement)envelope.getBody().getFirstElement().getFirstOMChild();
View Full Code Here

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

        Options options = new Options();
        options.setTo(targetEPR);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
       
        AxisCallback callback = new AxisCallback() {
           
            public void onMessage(MessageContext msgContext) {
                TestingUtils.compareWithCreatedOMElement(
                        msgContext.getEnvelope().getBody().getFirstElement());
                finish = true;               
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 synchronized 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

            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);
            options.setAction(operationName.getLocalPart());
           
            AxisCallback callback = new AxisCallback() {
               
                public void onMessage(MessageContext msgContext) {
                    TestingUtils.compareWithCreatedOMElement(
                            msgContext.getEnvelope().getBody().getFirstElement());
                    System.out.println("result = "
View Full Code Here

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

            Options options = new Options();
            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_TCP);
            options.setUseSeparateListener(true);
            options.setAction(operationName.getLocalPart());
            AxisCallback callback = new AxisCallback() {
                public void onComplete(MessageContext msgCtx) {
                    try {
                        msgCtx.getEnvelope().serializeAndConsume(StAXUtils
                                .createXMLStreamWriter(System.out));
                    } catch (XMLStreamException e) {
View Full Code Here

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

        Options options = new Options();
        options.setTo(targetEPR);
        options.setTransportInProtocol(Constants.TRANSPORT_TCP);
        options.setAction(Constants.AXIS2_NAMESPACE_URI + "/" + operationName.getLocalPart());

        AxisCallback callback = new AxisCallback() {
            public void onComplete(MessageContext msgCtx) {
                try {
                    msgCtx.getEnvelope().serialize(StAXUtils
                            .createXMLStreamWriter(System.out));
                } catch (XMLStreamException e) {
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.