本文整理汇总了Java中org.apache.axis2.description.AxisOperation.disengageModule方法的典型用法代码示例。如果您正苦于以下问题:Java AxisOperation.disengageModule方法的具体用法?Java AxisOperation.disengageModule怎么用?Java AxisOperation.disengageModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.AxisOperation
的用法示例。
在下文中一共展示了AxisOperation.disengageModule方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testOperationDisengagement
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void testOperationDisengagement() throws AxisFault {
AxisModule module = config.getModule("testModule");
assertNotNull(module);
Phase phase;
Phase userPhase;
List globalinflow = config.getInFlowPhases();
assertNotNull(globalinflow);
phase = (Phase) globalinflow.get(3);
assertNotNull(phase);
assertEquals(phase.getHandlerCount(), 0);
AxisService service = config.getService(serviceName);
assertNotNull(service);
AxisOperation operation = service.getOperation(opName);
assertNotNull(operation);
userPhase = (Phase) operation.getRemainingPhasesInFlow().get(1);
assertNotNull(userPhase);
assertEquals(0, userPhase.getHandlerCount());
config.engageModule(module.getName());
assertEquals(2, phase.getHandlerCount());
assertEquals(1, userPhase.getHandlerCount());
operation.disengageModule(module);
assertEquals(2, phase.getHandlerCount());
assertEquals(0, userPhase.getHandlerCount());
}
示例2: testServiceEngageOperationDisengage
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void testServiceEngageOperationDisengage() throws AxisFault {
AxisModule module = config.getModule("testModule");
assertNotNull(module);
Phase phase;
Phase userPhase;
List globalinflow = config.getInFlowPhases();
assertNotNull(globalinflow);
phase = (Phase) globalinflow.get(3);
assertNotNull(phase);
assertEquals(phase.getHandlerCount(), 0);
AxisService service = config.getService(serviceName);
assertNotNull(service);
AxisOperation operation = service.getOperation(opName);
assertNotNull(operation);
userPhase = (Phase) operation.getRemainingPhasesInFlow().get(1);
assertNotNull(userPhase);
assertEquals(0, userPhase.getHandlerCount());
service.engageModule(module);
assertEquals(2, phase.getHandlerCount());
assertEquals(1, userPhase.getHandlerCount());
operation.disengageModule(module);
assertEquals(2, phase.getHandlerCount());
assertEquals(0, userPhase.getHandlerCount());
}
示例3: testOperationEngageOperationDisengage
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void testOperationEngageOperationDisengage() throws AxisFault {
AxisModule module = config.getModule("testModule");
assertNotNull(module);
Phase phase;
Phase userPhase;
List globalinflow = config.getInFlowPhases();
assertNotNull(globalinflow);
phase = (Phase) globalinflow.get(3);
assertNotNull(phase);
assertEquals(phase.getHandlerCount(), 0);
AxisService service = config.getService(serviceName);
assertNotNull(service);
AxisOperation operation = service.getOperation(opName);
assertNotNull(operation);
userPhase = (Phase) operation.getRemainingPhasesInFlow().get(1);
assertNotNull(userPhase);
assertEquals(0, userPhase.getHandlerCount());
operation.engageModule(module);
assertEquals(2, phase.getHandlerCount());
assertEquals(1, userPhase.getHandlerCount());
operation.disengageModule(module);
assertEquals(0, phase.getHandlerCount());
assertEquals(0, userPhase.getHandlerCount());
}
示例4: processdisengageModule
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void processdisengageModule(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
String type = req.getParameter("type");
String serviceName = req.getParameter("serviceName");
String moduleName = req.getParameter("module");
AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
AxisService service = axisConfiguration.getService(serviceName);
AxisModule module = axisConfiguration.getModule(moduleName);
if (type.equals("operation")) {
if (service.isEngaged(module.getName()) ||
axisConfiguration.isEngaged(module.getName())) {
req.getSession().setAttribute("status", "Can not disengage module " + moduleName +
". This module is engaged at a higher level.");
} else {
String opName = req.getParameter("operation");
AxisOperation op = service.getOperation(new QName(opName));
op.disengageModule(module);
req.getSession()
.setAttribute("status", "Module " + moduleName + " was disengaged from " +
"operation " + opName + " in service " + serviceName + ".");
}
} else {
if (axisConfiguration.isEngaged(module.getName())) {
req.getSession()
.setAttribute("status", "Can not disengage module " + moduleName + ". " +
"This module is engaged at a higher level.");
} else {
service.disengageModule(axisConfiguration.getModule(moduleName));
req.getSession()
.setAttribute("status", "Module " + moduleName + " was disengaged from" +
" service " + serviceName + ".");
}
}
renderView("disengage.jsp", req, res);
}