Package javax.xml.ws

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


        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

    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

            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

        });
      
        // Allow the AsyncHandlerProxyFactory to create the proxy for the AsyncHandler
        // passed in (which was provided by the client on the async invocation).
        // This allows any server-specific work to be done, such as thread context management, etc.
        AsyncHandler originalHandler = handler;
        try {
            if (debug) {
                log.debug("Calling factory to create proxy for AsyncHandler instance: " + displayHandle(handler));
            }
            AsyncHandlerProxyFactory proxyFactory = (AsyncHandlerProxyFactory) FactoryRegistry
View Full Code Here

            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);
           
            // Try again
            handler = new AsyncCallback();
            response = dwp.invokeAsync(request, handler);
View Full Code Here

            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);
           
            // Try again
            handler = new AsyncCallback();
            response = dwp.twoWayAsync(request, handler);
View Full Code Here

        this.handlerPos = handlerPos;
    }

    Future<?> invoke(Object proxy, Object[] args) throws WebServiceException {
        // the spec requires the last argument
        final AsyncHandler handler = (AsyncHandler)args[handlerPos];

        return doInvoke(proxy, args, handler);
    }
View Full Code Here

      verifyResponse((Source)response.get(3000, TimeUnit.MILLISECONDS));
   }

   public void testInvokeAsynchHandler() throws Exception
   {
      AsyncHandler handler = new AsyncHandler()
      {
         public void handleResponse(Response response)
         {
            try
            {
View Full Code Here

      verifyResponse((Source)response.get(3000, TimeUnit.MILLISECONDS));
   }

   public void testInvokeAsynchHandler() throws Exception
   {
      AsyncHandler handler = new AsyncHandler()
      {
         public void handleResponse(Response response)
         {
            try
            {
View Full Code Here

TOP

Related Classes of javax.xml.ws.AsyncHandler

Copyright © 2018 www.massapicom. 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.