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


Java AxisOperation.setPhasesOutFlow方法代码示例

本文整理汇总了Java中org.apache.axis2.description.AxisOperation.setPhasesOutFlow方法的典型用法代码示例。如果您正苦于以下问题:Java AxisOperation.setPhasesOutFlow方法的具体用法?Java AxisOperation.setPhasesOutFlow怎么用?Java AxisOperation.setPhasesOutFlow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.description.AxisOperation的用法示例。


在下文中一共展示了AxisOperation.setPhasesOutFlow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testClientsideHandlerFailureInOutboundPhaseWithFirstHandler

import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void testClientsideHandlerFailureInOutboundPhaseWithFirstHandler() throws Exception {
    System.out.println("Starting testClientsideHandlerFailureInOutboundPhaseWithFirstHandler");

    OMElement payload = TestingUtils.createDummyOMElement();
    ServiceClient sender = createClient();

    AxisOperation operation =
            sender.getAxisService().getOperation(ServiceClient.ANON_OUT_IN_OP);
    ArrayList operationSpecificPhases = new ArrayList();
    operationSpecificPhases.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
    operation.setPhasesOutFlow(operationSpecificPhases);
    ArrayList phaseList = operation.getPhasesOutFlow();
    for (int i = 0; i < phaseList.size(); i++) {
        Phase operationSpecificPhase = (Phase)phaseList.get(i);
        if (PhaseMetadata.PHASE_POLICY_DETERMINATION
                .equals(operationSpecificPhase.getPhaseName())) {
            //phase1.addHandler(new TestHandler("COut1"));
            TestHandler clientOutboundHandler = new TestHandler("COut1");
            clientOutboundHandler.shouldFail(true);
            operationSpecificPhase.addHandler(clientOutboundHandler);
            //phase1.addHandler(clientOutboundHandler);
        }
    }

    try {
        OMElement result = sender.sendReceive(payload);
        fail("An expected handler failure did not occur");
    }
    catch (AxisFault e) {
    }
    List expectedExecutionState = Arrays.asList(new String[] { "kaboom" });
    assertEquals(expectedExecutionState, testResults);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:34,代码来源:HandlerExecutionTest.java

示例2: testClientsideHandlerFailureInOutboundPhase

import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void testClientsideHandlerFailureInOutboundPhase() throws Exception {
    System.out.println("Starting testClientsideHandlerFailureInOutboundPhase");

    OMElement payload = TestingUtils.createDummyOMElement();
    ServiceClient sender = createClient();

    AxisOperation operation =
            sender.getAxisService().getOperation(ServiceClient.ANON_OUT_IN_OP);
    ArrayList operationSpecificPhases = new ArrayList();
    operationSpecificPhases.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
    operation.setPhasesOutFlow(operationSpecificPhases);
    ArrayList phaseList = operation.getPhasesOutFlow();
    for (int i = 0; i < phaseList.size(); i++) {
        Phase operationSpecificPhase = (Phase)phaseList.get(i);
        if (PhaseMetadata.PHASE_POLICY_DETERMINATION
                .equals(operationSpecificPhase.getPhaseName())) {
            operationSpecificPhase.addHandler(new TestHandler("COut1"));
            TestHandler clientOutboundHandler = new TestHandler("COut2");
            clientOutboundHandler.shouldFail(true);
            operationSpecificPhase.addHandler(clientOutboundHandler);
            operationSpecificPhase.addHandler(new TestHandler("COut3"));
        }
    }

    try {
        OMElement result = sender.sendReceive(payload);
        fail("An expected handler failure did not occur");
    }
    catch (AxisFault e) {
    }
    List expectedExecutionState = Arrays.asList(new String[] { "COut1", "kaboom", "FCCOut1" });
    assertEquals(expectedExecutionState, testResults);

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:35,代码来源:HandlerExecutionTest.java

示例3: setOperationPhases

import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public void setOperationPhases(AxisOperation axisOperation) throws AxisFault {
    if (axisOperation != null) {
        try {
            axisOperation.setRemainingPhasesInFlow(getOperationInPhases());
            axisOperation.setPhasesOutFlow(getOperationOutPhases());
            axisOperation.setPhasesInFaultFlow(new ArrayList(getOperationInFaultPhases()));
            axisOperation.setPhasesOutFaultFlow(getOperationOutFaultPhases());
        } catch (DeploymentException e) {
            throw AxisFault.makeFault(e);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:13,代码来源:PhasesInfo.java


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