本文整理汇总了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);
}
示例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);
}
示例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);
}
}
}