本文整理汇总了Java中org.apache.axis2.engine.AxisConfiguration.getInFlowPhases方法的典型用法代码示例。如果您正苦于以下问题:Java AxisConfiguration.getInFlowPhases方法的具体用法?Java AxisConfiguration.getInFlowPhases怎么用?Java AxisConfiguration.getInFlowPhases使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.engine.AxisConfiguration
的用法示例。
在下文中一共展示了AxisConfiguration.getInFlowPhases方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testPhaseRules
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testPhaseRules() throws Exception {
//TODO fix me
axisConfig = new AxisConfiguration();
List inPhase = axisConfig.getInFlowPhases();
Phase transportIN = new Phase("TransportIn");
Phase preDispatch = new Phase("PreDispatch");
DispatchPhase dispatchPhase = new DispatchPhase();
//
dispatchPhase.setName("Dispatch");
inPhase.add(transportIN);
inPhase.add(preDispatch);
inPhase.add(dispatchPhase);
HandlerDescription hm = new HandlerDescription();
hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
Handler h1 = new PhaseRuleHandler();
hm.setHandler(h1);
hm.getRules().setPhaseName("*");
PhaseHolder ph = new PhaseHolder(inPhase);
ph.addHandler(hm);
boolean found;
for (int i = 0; i < inPhase.size(); i++) {
found = false;
Phase phase = (Phase) inPhase.get(i);
List handlers = phase.getHandlers();
for (int j = 0; j < handlers.size(); j++) {
Handler handler = (Handler) handlers.get(j);
if (h1.equals(handler)) {
found = true;
}
}
if (!found) {
fail("Some thing has gone wrong hnadler does not exit in the phase :"
+ phase.getPhaseName());
}
}
}
示例2: testPhaseRulesWithPhaseFirst
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testPhaseRulesWithPhaseFirst() throws Exception {
super.setUp();
//TODO fix me
axisConfig = new AxisConfiguration();
List inPhase = axisConfig.getInFlowPhases();
Phase transportIN = new Phase("TransportIn");
Phase preDispatch = new Phase("PreDispatch");
DispatchPhase dispatchPhase = new DispatchPhase();
//
dispatchPhase.setName("Dispatch");
inPhase.add(transportIN);
inPhase.add(preDispatch);
inPhase.add(dispatchPhase);
HandlerDescription hm = new HandlerDescription();
hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
Handler h1 = new PhaseRuleHandler();
hm.setHandler(h1);
hm.getRules().setPhaseName("*");
hm.getRules().setPhaseFirst(true);
PhaseHolder ph = new PhaseHolder(inPhase);
ph.addHandler(hm);
for (int i = 0; i < inPhase.size(); i++) {
Phase phase = (Phase) inPhase.get(i);
List handlers = phase.getHandlers();
Handler handler = (Handler) handlers.get(0);
if (!h1.equals(handler)) {
fail("Some thing has gone wrong hnadler does not exit as phase " +
"first handler the phase :"
+ phase.getPhaseName());
}
}
}
示例3: testPhaseRulesWithAfter
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testPhaseRulesWithAfter() throws Exception {
//TODO fix me
axisConfig = new AxisConfiguration();
List inPhase = axisConfig.getInFlowPhases();
Phase transportIN = new Phase("TransportIn");
Phase preDispatch = new Phase("PreDispatch");
DispatchPhase dispatchPhase = new DispatchPhase();
//
dispatchPhase.setName("Dispatch");
inPhase.add(transportIN);
inPhase.add(preDispatch);
inPhase.add(dispatchPhase);
HandlerDescription hm = new HandlerDescription();
hm.setClassName("org.apache.axis2.handlers.AbstractHandler");
Handler h1 = new PhaseRuleHandler();
hm.setHandler(h1);
hm.getRules().setPhaseName("*");
hm.getRules().setPhaseFirst(true);
PhaseHolder ph = new PhaseHolder(inPhase);
ph.addHandler(hm);
for (int i = 0; i < inPhase.size(); i++) {
Phase phase = (Phase) inPhase.get(i);
List handlers = phase.getHandlers();
Handler handler = (Handler) handlers.get(0);
assertNull(handler.getHandlerDesc().getRules().getAfter());
}
}