Examples of AsyncHandler


Examples of javax.xml.ws.AsyncHandler

        throws Exception {
        Future<Response> future = theExecutor.submit(new Callable<Response>() {

            @Override
            public Response call() {
                AsyncHandler handler = (AsyncHandler)args[args.length - 1];
                Response response = doInvokeAsyncPoll(proxy, asyncMethod, Arrays.copyOf(args, args.length - 1));
                // Invoke the callback handler, if present
                if (handler != null) {
                    handler.handleResponse(response);
                } // end if
                return response;
            }
        });
        return future.get();
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            BindingProvider p = (BindingProvider)proxy;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
               
            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
            TestLogger.logger.debug(">> Invoking Proxy Asynchronous Callback");
            AsyncHandler handler = new AsyncCallback();
            Future<?> response = dwp.invokeAsync(request, handler);
            TestLogger.logger.debug("---------------------------------------");
        }catch(Exception e){
            e.printStackTrace();
            fail("Exception received" + e);
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            Object proxy =service.getPort(portName, DocLitWrappedProxy.class);
            BindingProvider p = (BindingProvider)proxy;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
               
            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
            AsyncHandler handler = new AsyncCallback();
            Future<?> response = dwp.twoWayAsync(request, handler);
           
        }catch(Exception e){
            e.printStackTrace();
            fail("Exception received" + e);
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

     */
    @SuppressWarnings("unchecked")
    private Object doInvokeAsyncCallback(final Object proxy, final Method asyncMethod, final Object[] args)
        throws Exception {

        AsyncHandler callback = (AsyncHandler)args[args.length - 1];
        Response response = doInvokeAsyncPoll(proxy, asyncMethod, Arrays.copyOf(args, args.length - 1), callback);
        return response;

    } // end method doInvokeAsyncCallback
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            BindingProvider p = (BindingProvider)proxy;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
               
            DocLitWrappedProxy dwp = (DocLitWrappedProxy)proxy;
            TestLogger.logger.debug(">> Invoking Proxy Asynchronous Callback");
            AsyncHandler handler = new AsyncCallback();
            Future<?> response = dwp.invokeAsync(request, handler);
            TestLogger.logger.debug("---------------------------------------");
        }catch(Exception e){
            e.printStackTrace();
            fail("Exception received" + e);
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

        throws Exception {
        Future<Response> future = theExecutor.submit(new Callable<Response>() {

            @Override
            public Response call() {
                AsyncHandler handler = (AsyncHandler)args[args.length - 1];
                Response response = doInvokeAsyncPoll(proxy, asyncMethod, Arrays.copyOf(args, args.length - 1));
                // Invoke the callback handler, if present
                if (handler != null) {
                    handler.handleResponse(response);
                } // end if
                return response;
            }
        });
        return future.get();
View Full Code Here

Examples of javax.xml.ws.AsyncHandler

    public void testOperationResolution_AsyncCallback_String_PAYLOAD() {
        Service service = Service.create(wsdlDocumentLocation, serviceQName);
        Dispatch<String> dispatch = service.createDispatch(portQName, String.class, Service.Mode.PAYLOAD);
        assertNotNull(dispatch);
       
        AsyncHandler asyncHandler = new TestAsyncHandler();
        Future<?> future = dispatch.invokeAsync(echoBodyContent_PAYLOAD, asyncHandler);
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        MessageContext requestMC = ic.getRequestMessageContext();
       
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.