Package org.apache.axis2.description

Examples of org.apache.axis2.description.HandlerDescription


                new ConfigurationContext(new AxisConfiguration()));

        PhaseHolder ph = new PhaseHolder(phases);


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

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

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


        inPhase.add(preDispatch);
        inPhase.add(dispatchPhase);

        PhaseHolder ph = new PhaseHolder(inPhase);

        HandlerDescription hm = new HandlerDescription();
        hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h1 = new PhaseRuleHandlers();
        h1.init(hm);
        hm.setHandler(h1);
        hm.setName(new QName("H1"));
        PhaseRule rule = new PhaseRule();
        rule.setPhaseName("PreDispatch");
        rule.setPhaseFirst(true);
        hm.setRules(rule);
        ph.addHandler(hm);

        HandlerDescription hm1 = new HandlerDescription();
        hm1.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h2 = new PhaseRuleHandlers();
        h2.init(hm1);
        hm1.setHandler(h2);
        hm1.setName(new QName("H2"));
        PhaseRule rule1 = new PhaseRule();
        rule1.setPhaseName("PreDispatch");
        rule1.setAfter("H1");
        hm1.setRules(rule1);
        ph.addHandler(hm1);

        HandlerDescription hm2 = new HandlerDescription();
        hm2.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h3 = new PhaseRuleHandlers();
        h3.init(hm2);
        hm2.setHandler(h3);
        hm2.setName(new QName("H3"));
        PhaseRule rule2 = new PhaseRule();
        rule2.setPhaseName("PreDispatch");
        rule2.setAfter("H1");
        rule2.setBefore("H2");
        hm2.setRules(rule2);
        ph.addHandler(hm2);

        HandlerDescription hm3 = new HandlerDescription();
        hm3.setClassName("org.apache.axis2.handlers.AbstractHandler");
        Handler h4 = new PhaseRuleHandlers();
        h4.init(hm3);
        hm3.setHandler(h4);
        hm3.setName(new QName("H4"));
        PhaseRule rule3 = new PhaseRule();
        rule3.setPhaseName("Dispatch");
        hm3.setRules(rule3);
        ph.addHandler(hm3);
    }
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.setPhaseLast(true);
            rule.setBefore("H2");
            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");
            hm1.setRules(rule1);
            ph.addHandler(hm1);
            fail(
                    "Handler with PhaseFirst can not have any before or after proprty error in ");
        } 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("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.setPhaseLast(true);
            hm1.setRules(rule1);
            ph.addHandler(hm1);
            fail("This should be faild with Phaselast already has been set, cannot have two " +
                    "phaseFirst Handler for same phase ");
        } catch (AxisFault axisFault) {
            return;
View Full Code Here

import java.util.Iterator;

public class Utils {

    public static void addHandler(Flow flow, Handler handler, String phaseName) {
        HandlerDescription handlerDesc = new HandlerDescription();
        PhaseRule rule = new PhaseRule(phaseName);

        handlerDesc.setRules(rule);
        handler.init(handlerDesc);
        handlerDesc.setHandler(handler);
        flow.addHandler(handlerDesc);
    }
View Full Code Here

        return service;
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

        return null;
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

     */
    public static final QName NAME = new QName("http://ws.apache.org/axis2/", "AbstractDispatcher");
    private Log log = LogFactory.getLog(getClass());

    public AbstractDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

        return null;
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
View Full Code Here

        return null;
    }

    public void initDispatcher() {
        init(new HandlerDescription(NAME));
    }
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.