Examples of FaultLocation


Examples of org.apache.cxf.greeter_control.types.FaultLocation

       
        // test failure in phases before Phase.PRE_LOGICAL
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setAfter(MAPAggregator.class.getName());
       
        // test failure occuring before logical addressing interceptor

        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.PRE_LOGICAL.equals(p.getName())) {
                break;
            }  
            testFail(location, true);
        }
       
        // test failure occuring after logical addressing interceptor -
        // won't get a fault in case of oneways (partial response already sent)
       
        do
            location.setPhase(p.getName());
            if (Phase.INVOKE.equals(p.getName())) {
                break;
            }            
            testFail(location, true);
            p = it.hasNext() ? it.next() : null;
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

        // behaviour is identicial for all phases
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();       
       
        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.PRE_LOGICAL.equals(p.getName())) {
                break;
            }            
            testFail(location);
        }
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

       
        // test failure in phases before Phase.PRE_LOGICAL
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setAfter(MAPAggregator.class.getName());
       
        // test failure occuring before logical addressing interceptor

        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.PRE_LOGICAL.equals(p.getName())) {
                break;
            }  
            testFail(location, true);
        }
       
        // test failure occuring after logical addressing interceptor -
        // won't get a fault in case of oneways (partial response already sent)
       
        do
            location.setPhase(p.getName());
            if (Phase.INVOKE.equals(p.getName())) {
                //faults from the PRE_LOGICAL and later phases won't make
                //it back to the client, the 200/202 response has already
                //been returned.  The server has accepted the message
                break;
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

        // behaviour is identicial for all phases
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();       
       
        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.PRE_LOGICAL.equals(p.getName())) {
                break;
            }            
            testFail(location);
        }
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

       
        // test failure in phases before Phase.PRE_LOGICAL
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setAfter(MAPAggregator.class.getName());
       
        // test failure occuring before logical addressing interceptor

        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.PRE_LOGICAL.equals(p.getName())) {
                break;
            }  
            testFail(location, true);
        }
       
        // test failure occuring after logical addressing interceptor -
        // won't get a fault in case of oneways (partial response already sent)
       
        do
            location.setPhase(p.getName());
            if (Phase.INVOKE.equals(p.getName())) {
                //faults from the PRE_LOGICAL and later phases won't make
                //it back to the client, the 200/202 response has already
                //been returned.  The server has accepted the message
                break;
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

    public void testDefaultInvocationHandling() throws Exception {
        setupGreeter();

        control.setRobustInOnlyMode(false);
       
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setPhase(Phase.INVOKE);
        location.setBefore(ServiceInvokerInterceptor.class.getName());
       
        RMManager manager = greeterBus.getExtension(RMManager.class);

        // the message is acked and the invocation takes place
        greeter.greetMeOneWay("one");
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

    public void testRobustInvocationHandling() throws Exception {
        setupGreeter();

        control.setRobustInOnlyMode(true);
       
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setPhase(Phase.INVOKE);
        location.setBefore(ServiceInvokerInterceptor.class.getName());
       
        RMManager manager = greeterBus.getExtension(RMManager.class);

       
        // the message is acked and the invocation takes place
        greeter.greetMeOneWay("one");
        Thread.sleep(6000L);
        assertTrue("RetransmissionQueue must be empty", manager.getRetransmissionQueue().isEmpty());

        control.setFaultLocation(location);

        // the invocation fails but the message is acked because the delivery succeeds
        greeter.greetMeOneWay("two");
        Thread.sleep(6000L);
        assertFalse("RetransmissionQueue must not be empty", manager.getRetransmissionQueue().isEmpty());
       
        location.setPhase(null);
        control.setFaultLocation(location);

        // the retransmission succeeds and the invocation succeeds, the message is acked
        Thread.sleep(6000L);
        assertTrue("RetransmissionQueue must be empty", manager.getRetransmissionQueue().isEmpty());
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

        // all interceptors pass
        testInterceptorsPass(robust);

        // behaviour is identicial for all phases
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();       
       
        // test failure occuring before and after logical addressing interceptor
        // won't get a fault in case of oneways non-robust for the latter (partial response already sent)
        testInterceptorFail(inPhases, location, robust);
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

       
        // all interceptors pass
        testInterceptorsPass(robust);
       
        // test failure in phases before Phase.PRE_LOGICAL
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setAfter(MAPAggregator.class.getName());
       
        // test failure occuring before and after logical addressing interceptor
        // won't get a fault in case of oneways non-robust for the latter (partial response already sent)
        testInterceptorFail(inPhases, location, robust);
    }
View Full Code Here

Examples of org.apache.cxf.greeter_control.types.FaultLocation

        // behaviour is identicial for all phases
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();       
       
        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.INVOKE.equals(p.getName())) {
                break;
            }            
            testFail(location);
        }
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.