Examples of Phase


Examples of org.apache.cxf.phase.Phase

   
    @Test
    public void testOrder() throws Exception {
        //make sure the interceptors get ordered correctly
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(new Phase(Phase.PRE_PROTOCOL, 1));
       
        List<Interceptor<? extends Message>> lst =
            new ArrayList<Interceptor<? extends Message>>();
        lst.add(new MustUnderstandInterceptor());
        lst.add(new WSS4JInInterceptor());
View Full Code Here

Examples of org.apache.cxf.phase.Phase

        control = EasyMock.createNiceControl();
    }
   
    @Test
    public void testOrdering() {
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(p);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(phases);
        MAPAggregator map = new MAPAggregator();
View Full Code Here

Examples of org.apache.cxf.phase.Phase

    }
   
    @Test
    public void testOrdering() {
        control.replay();
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(p);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(phases);
        MAPAggregator map = new MAPAggregator();
View Full Code Here

Examples of org.apache.cxf.phase.Phase

    @Test
    public void testOrder() throws Exception {
        //make sure the interceptors get ordered correctly
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(new Phase(Phase.PRE_PROTOCOL, 1));
       
        List<Interceptor> lst = new ArrayList<Interceptor>();
        lst.add(new MustUnderstandInterceptor());
        lst.add(new WSS4JInInterceptor());
        lst.add(new SAAJInInterceptor());
View Full Code Here

Examples of org.apache.cxf.phase.Phase

    private ColocUtil() {
        //Completge
    }

    public static void setPhases(SortedSet<Phase> list, String start, String end) {
        Phase startPhase = new Phase(start, 1);
        Phase endPhase = new Phase(end, 2);
        Iterator<Phase> iter = list.iterator();
        boolean remove = true;
        while (iter.hasNext()) {
            Phase p = iter.next();
            if (remove
                && p.getName().equals(startPhase.getName())) {
                remove = false;
            } else if (p.getName().equals(endPhase.getName())) {
                remove = true;
            } else if (remove) {
                iter.remove();
            }
        }
View Full Code Here

Examples of org.apache.cxf.phase.Phase

    }
   
    @Test
    public void testOrdering() {
        control.replay();
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(p);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(phases);
        MAPAggregator map = new MAPAggregator();
View Full Code Here

Examples of org.apache.cxf.phase.Phase

        control = EasyMock.createNiceControl();
    }
   
    @Test
    public void testOrdering() {
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(p);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(phases);
        MAPAggregator map = new MAPAggregator();
View Full Code Here

Examples of org.apache.cxf.phase.Phase

    @Test
    public void testOrder() throws Exception {
        //make sure the interceptors get ordered correctly
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(new Phase(Phase.PRE_PROTOCOL, 1));
       
        List<Interceptor<? extends Message>> lst = new ArrayList<Interceptor<? extends Message>>();
        lst.add(new MustUnderstandInterceptor());
        lst.add(new WSS4JInInterceptor());
        lst.add(new SAAJInInterceptor());
View Full Code Here

Examples of org.apache.cxf.phase.Phase

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

        // 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.phase.Phase

        }
       
        // 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
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.