Examples of AddNumbersHandlerPortType


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

        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(new AddNumbersClientLogicalHandler4());
            handlers.add(new AddNumbersClientLogicalHandler3());
            handlers.add(new AddNumbersClientLogicalHandler());
           
            p.getBinding().setHandlerChain(handlers);

            int total = proxy.addNumbersHandler(99,10);
           
            fail("Should have got an exception, but we didn't.");
        } catch(Exception e) {
            e.printStackTrace();
            assertTrue("Exception should be SOAPFaultException. Found " +e.getClass() + " "+ e.getMessage(), e instanceof SOAPFaultException);
View Full Code Here

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

        try{
            TestLogger.logger.debug("----------------------------------");
            TestLogger.logger.debug("test: " + getName());
           
            AddNumbersHandlerService service = new AddNumbersHandlerService();
            AddNumbersHandlerPortType proxy = service.getAddNumbersHandlerPort();
           
            BindingProvider p = (BindingProvider)proxy;

            // Force a local connection exception by using an invalid host/port
            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, invalidAxisEndpoint);

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

            int total = proxy.addNumbersHandler(1,2);
           
            fail("Should have got an exception, but we didn't.");
        } catch(Exception e) {
            assertTrue("Exception should be SOAPFaultException. Found " +e.getClass() + " "+ e.getMessage(), e instanceof SOAPFaultException);
            SOAPFault soapFault = ((SOAPFaultException) e).getFault();
View Full Code Here

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

            TestLogger.logger.debug("test: " + getName());
           
            AddNumbersHandlerService service = new AddNumbersHandlerService();
            setAxisConfigParameter(service, org.apache.axis2.jaxws.Constants.DISABLE_SOAPFAULT_FOR_LOCAL_EXCEPTION,
                    "true");
            AddNumbersHandlerPortType proxy = service.getAddNumbersHandlerPort();
           
            BindingProvider p = (BindingProvider)proxy;

            // Force a local connection exception by using an invalid host/port
            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, invalidAxisEndpoint);

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

            int total = proxy.addNumbersHandler(1,2);
           
            fail("Should have got an exception, but we didn't.");
        } catch(Exception e) {
            assertTrue("Exception should be WebServiceException.", e instanceof WebServiceException);
            assertFalse("Exception should not be SOAPFaultException.", e instanceof SOAPFaultException);
View Full Code Here

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

        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) {
View Full Code Here

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

        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(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);

            while (!future.isDone()) {
                Thread.sleep(1000);
                TestLogger.logger.debug("Async invocation incomplete");
            }
View Full Code Here

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

        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, invalidAxisEndpoint);

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

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

            while (!future.isDone()) {
                Thread.sleep(1000);
                TestLogger.logger.debug("Async invocation incomplete");
            }
View Full Code Here

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

        try {
            TestLogger.logger.debug("----------------------------------");
            TestLogger.logger.debug("test: " + getName());
           
            AddNumbersHandlerService service = new AddNumbersHandlerService();
            AddNumbersHandlerPortType proxy = service.getAddNumbersHandlerPort();
           
            BindingProvider bp = (BindingProvider) proxy;
            bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                    axisEndpoint);
            proxy.oneWayInt(11);
           
            // one-way invocations run in their own thread,
            // and we can't tell here in the client when it
            // has completed.  So, we need to wait long enough
            // for the invocation to complete, so our log file
View Full Code Here

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

        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);
            p.getRequestContext().put("myClientKey", "myClientVal");

            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
            proxy.oneWayInt(99);
        } catch (Exception e) {           
            e.printStackTrace();
            exception = e;
        }
       
View Full Code Here

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

        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);
            p.getRequestContext().put("myClientKey", "myClientVal");

            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
            proxy.oneWayInt(999);
        } catch (Exception e) {
            e.printStackTrace();
            exception = e;
        }
       
View Full Code Here

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

    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)
      int total = proxy.addNumbersHandler(10,10);

            assertEquals("With handler manipulation, total should be 3 less than a proper sumation.", 17, total);
            TestLogger.logger.debug("Total (after handler manipulation) = " + total);
            TestLogger.logger.debug("----------------------------------");
    } catch(Exception 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.