Examples of AddNumbersClientProtocolHandler


Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

        TestLogger.logger.debug("----------------------------------");
    }

    public void testAddNumbersClientHandlerWithFalse() throws Exception {
        AddNumbersClientLogicalHandler2 clh = new AddNumbersClientLogicalHandler2();
        AddNumbersClientProtocolHandler  cph = new AddNumbersClientProtocolHandler();
        cph.setPivot(true);
        try{
            TestLogger.logger.debug("----------------------------------");
            TestLogger.logger.debug("test: " + getName());
           
            AddNumbersHandlerService service = new AddNumbersHandlerService();
            AddNumbersHandlerPortType proxy = service.getAddNumbersHandlerPort();
           
            BindingProvider p = (BindingProvider)proxy;
           
            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                    axisEndpoint);

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null) {
                handlers = new ArrayList<Handler>();
            }
            handlers.add(clh);
            handlers.add(cph);
           
            p.getBinding().setHandlerChain(handlers);

            int total = proxy.addNumbersHandler(99,10);
           
            // Note that a return of 0 indicates that the new message that was added to
            // in the client protocol handler was lost during handler processing.
            assertTrue("Expected a pivot and -99 to be returned. But it was "+ total, total == -99);
        } catch(Exception e) {
           throw e;
        } finally {
            cph.setPivot(false);
        }
       
        String log = readLogFile();
        String expected_calls =
              "AddNumbersClientLogicalHandler2 HANDLE_MESSAGE_OUTBOUND\n"
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientLogicalHandler2());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);

           
            AddNumbersHandlerAsyncCallback callback = new AddNumbersHandlerAsyncCallback();
            Future<?> future = proxy.addNumbersHandlerAsync(10, 10, callback);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);
           
            BindingProvider bp = (BindingProvider) proxy;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
            // value 99 will trigger exception from AddNumbersClientLogicalHandler
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);
           
            BindingProvider bp = (BindingProvider) proxy;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
            // value 99 will trigger exception from AddNumbersClientLogicalHandler
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

    class MyHandlerResolver implements HandlerResolver {

        public List<Handler> getHandlerChain(PortInfo portinfo) {
            ArrayList<Handler> handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            return handlers;
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = binding.getHandlerChain();
       
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            binding.setHandlerChain(handlers);
           
            //Invoke the Dispatch
            TestLogger.logger.debug(">> Invoking Async Dispatch");
            Source response = myDispatch.invoke(createRequestSource());
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);

            int total = proxy.addNumbersHandler(10,10);
           
            // see if I can get an APPLICATION scoped property set during outbound flow.  I should be able to do this according to 4.2.1
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);

            // value 102 triggers an endpoint exception, which will run through the server outbound
            // handleFault methods, then client inbound handleFault methods
            int total = proxy.addNumbersHandler(102,10);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientLogicalHandler2());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);

           
            AddNumbersHandlerAsyncCallback callback = new AddNumbersHandlerAsyncCallback();
            Future<?> future = proxy.addNumbersHandlerAsync(10, 10, callback);
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientProtocolHandler

            List<Handler> handlers = p.getBinding().getHandlerChain();
            if (handlers == null)
                handlers = new ArrayList<Handler>();
            handlers.add(new AddNumbersClientLogicalHandler());
            handlers.add(new AddNumbersClientProtocolHandler());
            p.getBinding().setHandlerChain(handlers);
           
            BindingProvider bp = (BindingProvider) proxy;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
            // value 99 will trigger exception from AddNumbersClientLogicalHandler
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.