Package org.apache.axis2.description

Examples of org.apache.axis2.description.HandlerDescription


        phases.add(p1);
        Phase p2 = new Phase("PhaseB");
        phases.add(p2);

        PhaseHolder ph = new PhaseHolder(phases);
        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h1 = new PhaseRuleHandlers();
        h1.init(hm);
        ((PhaseRuleHandlers) h1).setName(new QName("PhaseLast"));
        hm.setHandler(h1);
        hm.setName(new QName("H1"));
        PhaseRule rule = new PhaseRule();
        rule.setPhaseName("PhaseA");
        rule.setPhaseLast(true);
        hm.setRules(rule);
        ph.addHandler(hm);

        HandlerDescription hm1 = new HandlerDescription();
        hm1.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h2 = new PhaseRuleHandlers();
        ((PhaseRuleHandlers) h2).setName(new QName("Second Handler"));
        h2.init(hm1);
        hm1.setHandler(h2);
        hm1.setName(new QName("H2"));
        PhaseRule rule1 = new PhaseRule();
        rule1.setPhaseName("PhaseA");
        rule1.setAfter("H1");
        hm1.setRules(rule1);
        try {
            ph.addHandler(hm1);
        } catch (PhaseException e) {
            return;
        }
View Full Code Here


        Phase p1 = new Phase("PhaseA");
        phases.add(p1);
        Phase p2 = new Phase("PhaseB");
        phases.add(p2);
        PhaseHolder ph = new PhaseHolder(phases);
        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h1 = new PhaseRuleHandlers();
        h1.init(hm);
        ((PhaseRuleHandlers) h1).setName(new QName("PhaseFirstHnadler"));
        hm.setHandler(h1);
        hm.setName(new QName("H1"));
        PhaseRule rule = new PhaseRule();
        rule.setPhaseName("PhaseA");
        rule.setPhaseFirst(true);
        hm.setRules(rule);
        ph.addHandler(hm);

        HandlerDescription hm1 = new HandlerDescription();
        hm1.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h2 = new PhaseRuleHandlers();
        ((PhaseRuleHandlers) h2).setName(new QName("Second Handler"));
        h2.init(hm1);
        hm1.setHandler(h2);
        hm1.setName(new QName("H2"));
        PhaseRule rule1 = new PhaseRule();
        rule1.setPhaseName("PhaseA");
        rule1.setBefore("H1");
        hm1.setRules(rule1);
        try {
            ph.addHandler(hm1);
        } catch (PhaseException e) {
            return;
        }
View Full Code Here

            Handler han = null;
            PhaseHolder ph = new PhaseHolder(inPhase);


            HandlerDescription hm = new HandlerDescription();
            hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
            hm.setHandler(han);
            hm.setName(new QName("H1"));
            PhaseRule rule = new PhaseRule();
            rule.setPhaseName("global");
            rule.setPhaseFirst(true);
            hm.setRules(rule);
            ph.addHandler(hm);

            HandlerDescription hm1 = new HandlerDescription();
            hm1.setClassName("org.apache.axis2.handlers.AbstractHandler");
            hm1.setHandler(han);
            hm1.setName(new QName("H2"));
            PhaseRule rule1 = new PhaseRule();
            rule1.setPhaseName("global");
            rule1.setAfter("H1");
            hm1.setRules(rule1);
            ph.addHandler(hm1);

            HandlerDescription hm3 = new HandlerDescription();
            hm3.setClassName("org.apache.axis2.handlers.AbstractHandler");
            hm3.setHandler(han);
            hm3.setName(new QName("H4"));
            PhaseRule rule3 = new PhaseRule();
            rule3.setPhaseName("Logging");
            hm3.setRules(rule3);
            ph.addHandler(hm3);
            fail("this must failed gracefully with PhaseException ");
        } catch (Exception e) {
            log.info(e.getMessage());
        }
View Full Code Here

            Handler han = null;
            PhaseHolder ph = new PhaseHolder(inPhase);


            HandlerDescription hm = new HandlerDescription();
            hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
            hm.setHandler(han);
            hm.setName(new QName("H1"));
            PhaseRule rule = new PhaseRule();
            rule.setPhaseName("global");
            rule.setPhaseFirst(true);
            rule.setPhaseLast(true);
            hm.setRules(rule);
            ph.addHandler(hm);

            HandlerDescription hm1 = new HandlerDescription();
            hm1.setClassName("org.apache.axis2.handlers.AbstractHandler");
            hm1.setHandler(han);
            hm1.setName(new QName("H2"));
            PhaseRule rule1 = new PhaseRule();
            rule1.setPhaseName("global");
            rule1.setAfter("H1");
            hm1.setRules(rule1);
            ph.addHandler(hm1);

            fail("this must failed gracefully with PhaseException ");
        } catch (Exception e) {
            log.info(e.getMessage());
View Full Code Here

            MessageContext msg = new MessageContext();
            msg.setConfigurationContext(
                    new ConfigurationContext(new AxisConfiguration()));

            PhaseHolder ph = new PhaseHolder(phases);
            HandlerDescription hm = new HandlerDescription();
            hm.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
            Handler h1 = new PhaseRuleHandlers();
            h1.init(hm);
            ((PhaseRuleHandlers) h1).setName(new QName("PhaseFirstHnadler"));
            hm.setHandler(h1);
            hm.setName(new QName("H1"));
            PhaseRule rule = new PhaseRule();
            rule.setPhaseName("PhaseA");
            rule.setPhaseFirst(true);
            hm.setRules(rule);
            ph.addHandler(hm);

            HandlerDescription hm1 = new HandlerDescription();
            hm1.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
            Handler h2 = new PhaseRuleHandlers();
            ((PhaseRuleHandlers) h2).setName(new QName("Second Handler"));
            h2.init(hm1);
            hm1.setHandler(h2);
            hm1.setName(new QName("H2"));
            PhaseRule rule1 = new PhaseRule();
            rule1.setPhaseName("PhaseA");
            rule1.setPhaseFirst(true);
            hm1.setRules(rule1);
            ph.addHandler(hm1);
            fail("This should be faild with PhaseFirst already has been set, cannot have two " +
                    "phaseFirst Handler for same phase ");
        } catch (AxisFault axisFault) {
            return;
View Full Code Here

            MessageContext msg = new MessageContext();
            msg.setConfigurationContext(
                    new ConfigurationContext(new AxisConfiguration()));

            PhaseHolder ph = new PhaseHolder(phases);
            HandlerDescription hm = new HandlerDescription();
            hm.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
            Handler h1 = new PhaseRuleHandlers();
            h1.init(hm);
            ((PhaseRuleHandlers) h1).setName(new QName("PhaseFirstHnadler"));
            hm.setHandler(h1);
            hm.setName(new QName("H1"));
            PhaseRule rule = new PhaseRule();
            rule.setPhaseName("PhaseA");
            rule.setPhaseFirst(true);
            rule.setPhaseLast(true);
            hm.setRules(rule);
            ph.addHandler(hm);

            HandlerDescription hm1 = new HandlerDescription();
            hm1.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
            Handler h2 = new PhaseRuleHandlers();
            ((PhaseRuleHandlers) h2).setName(new QName("Second Handler"));
            h2.init(hm1);
            hm1.setHandler(h2);
            hm1.setName(new QName("H2"));
            PhaseRule rule1 = new PhaseRule();
            rule1.setPhaseName("PhaseA");
            rule1.setAfter("H1");
            hm1.setRules(rule1);
            ph.addHandler(hm1);
            p1.invoke(msg);
            fail("This should fail with : can only have one handler, since there is a " +
                    "handler with both phaseFirst and PhaseLast true ");
        } catch (AxisFault axisFault) {
View Full Code Here

        smbd.initDispatcher();

        InstanceDispatcher id = new InstanceDispatcher();

        id.init(new HandlerDescription(new QName("InstanceDispatcher")));
        dispatchPhase.addHandler(abd);
        dispatchPhase.addHandler(rud);
        dispatchPhase.addHandler(sabd);
        dispatchPhase.addHandler(smbd);
        dispatchPhase.addHandler(id);
View Full Code Here

        private boolean pause = false;

        public TempHandler(int index, boolean pause) {
            this.index = new Integer(index);
            this.pause = pause;
            init(new HandlerDescription(new QName("handler" + index)));
        }
View Full Code Here

            init(new HandlerDescription(new QName("handler" + index)));
        }

        public TempHandler(int index) {
            this.index = new Integer(index);
            init(new HandlerDescription(new QName("handler" + index)));
        }
View Full Code Here

        MessageContext msg = new MessageContext();
        msg.setConfigurationContext(new ConfigurationContext(new AxisConfiguration()));

        PhaseHolder ph = new PhaseHolder(phases);
        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h1 = new PhaseRuleHandlers();
        h1.init(hm);
        ((PhaseRuleHandlers) h1).setName(new QName("First"));
        hm.setHandler(h1);
        hm.setName(new QName("H1"));
        PhaseRule rule = new PhaseRule();
        rule.setPhaseName("PhaseA");
        hm.setRules(rule);
        ph.addHandler(hm);

        HandlerDescription hm1 = new HandlerDescription();
        hm1.setClassName("org.apache.axis2.phaserule.PhaseRuleHandlers");
        Handler h2 = new PhaseRuleHandlers();
        ((PhaseRuleHandlers) h2).setName(new QName("Second"));
        h2.init(hm1);
        hm1.setHandler(h2);
        hm1.setName(new QName("H2"));
        PhaseRule rule1 = new PhaseRule();
        rule1.setPhaseName("PhaseA");
        rule1.setBefore("H1");
        hm1.setRules(rule1);
        ph.addHandler(hm1);

        ArrayList handlers = p1.getHandlers();
        Handler handler = (Handler) handlers.get(0);
        if (handler != h2) {
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.HandlerDescription

Copyright © 2018 www.massapicom. 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.