当前位置: 首页>>代码示例>>Java>>正文


Java AxisOperation.disengageModule方法代码示例

本文整理汇总了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());
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:27,代码来源:ModuleDisengagementTest.java

示例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());
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:27,代码来源:ModuleDisengagementTest.java

示例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());
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:25,代码来源:ModuleDisengagementTest.java

示例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);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:36,代码来源:AdminAgent.java


注:本文中的org.apache.axis2.description.AxisOperation.disengageModule方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。