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

    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");
        waitForEmpty(manager.getRetransmissionQueue());

        control.setFaultLocation(location);

        // the invocation fails but the message is acked because the delivery succeeds
        greeter.greetMeOneWay("two");
        waitForNotEmpty(manager.getRetransmissionQueue());

        location.setPhase(null);
        control.setFaultLocation(location);

        // the retransmission succeeds and the invocation succeeds, the message is acked
        waitForEmpty(manager.getRetransmissionQueue());
       
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

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

        setupGreeter("org/apache/cxf/systest/interceptor/no-addr.xml", false);

        control.setRobustInOnlyMode(true);

        // behaviour is identicial for all phases
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setPhase("user-logical");
       
        control.setFaultLocation(location);

        try {
            // writer to grab the content of soap fault.
            // robust is not yet used at client's side, but I think it should
            StringWriter writer = new StringWriter();
            ((Client)greeter).getInInterceptors().add(new LoggingInInterceptor());
            ((LoggingInInterceptor)greeterBus.getInInterceptors().get(0)).setPrintWriter(new PrintWriter(writer));
            // it should tell CXF to convert one-way robust out faults into real SoapFaultException
            ((Client)greeter).getEndpoint().put(Message.ROBUST_ONEWAY, true);
            greeter.greetMeOneWay("oneway");
            fail("Oneway operation unexpectedly succeded for phase " + location.getPhase());
        } catch (SOAPFaultException ex) {
            //expected
        }
    }
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 <= Phase.UNMARSHALL
        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
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.