本文整理汇总了Java中org.apache.axis2.description.AxisOperation.isControlOperation方法的典型用法代码示例。如果您正苦于以下问题:Java AxisOperation.isControlOperation方法的具体用法?Java AxisOperation.isControlOperation怎么用?Java AxisOperation.isControlOperation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.AxisOperation
的用法示例。
在下文中一共展示了AxisOperation.isControlOperation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateDefaultSOAPBindingOperations
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
private static void generateDefaultSOAPBindingOperations(AxisService axisService,
OMFactory omFactory, OMElement binding,
OMNamespace wsdl, OMNamespace tns,
OMNamespace wsoap) {
Iterator iterator = axisService.getChildren();
while (iterator.hasNext()) {
AxisOperation axisOperation = (AxisOperation) iterator.next();
if (axisOperation.isControlOperation()) {
continue;
}
OMElement opElement = omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, wsdl);
binding.addChild(opElement);
String name = axisOperation.getName().getLocalPart();
opElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null,
tns.getPrefix() + ":" + name));
String soapAction = axisOperation.getSoapAction();
if (soapAction != null) {
opElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ACTION, wsoap,
soapAction));
}
}
}
示例2: flowComplete
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
@Override
// Handle IN_ONLY operations
public void flowComplete(MessageContext msgContext) {
if (msgContext.getEnvelope() == null) {
return;
}
AxisService axisService = msgContext.getAxisService();
if (axisService == null ||
SystemFilter.isFilteredOutService(axisService.getAxisServiceGroup()) ||
axisService.isClientSide()) {
return;
}
try {
// Process Request Counter
OperationContext opContext = msgContext.getOperationContext();
if (opContext != null && opContext.isComplete()) {
AxisOperation axisOp = opContext.getAxisOperation();
if (axisOp != null && axisOp.isControlOperation()) {
return;
}
if (axisOp != null) {
String mep = axisOp.getMessageExchangePattern();
if (mep != null &&
(mep.equals(WSDL2Constants.MEP_URI_IN_ONLY) ||
mep.equals(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY))) {
// Increment operation counter
final AxisOperation axisOperation = msgContext.getAxisOperation();
if (axisOperation != null) {
Parameter operationParameter =
axisOperation.getParameter(StatisticsConstants.IN_OPERATION_COUNTER);
if (operationParameter != null) {
((AtomicInteger) operationParameter.getValue()).incrementAndGet();
} else {
log.error(StatisticsConstants.IN_OPERATION_COUNTER +
" has not been set for operation " +
axisService.getName() + "." + axisOperation.getName());
return;
}
// Calculate response times
try {
ResponseTimeCalculator.calculateResponseTimes(msgContext);
} catch (AxisFault axisFault) {
log.error("Cannot compute response times", axisFault);
}
}
// Increment global counter
Parameter globalRequestCounter =
msgContext.getParameter(StatisticsConstants.GLOBAL_REQUEST_COUNTER);
((AtomicInteger) globalRequestCounter.getValue()).incrementAndGet();
updateCurrentInvocationGlobalStatistics(msgContext);
}
}
}
} catch (Throwable e) { // Catching Throwable since exceptions here should not be propagated up
log.error("Could not call InOnlyMEPHandler.flowComplete", e);
}
}
示例3: invoke
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
public InvocationResponse invoke(MessageContext outMsgContext) throws AxisFault {
if(outMsgContext.getEnvelope() == null){
return InvocationResponse.CONTINUE;
}
if (outMsgContext.getFLOW() != MessageContext.OUT_FLOW &&
outMsgContext.getFLOW() != MessageContext.OUT_FAULT_FLOW) {
log.error("InOutMEPHandler not deployed in OUT/OUT_FAULT flow. Flow: " +
outMsgContext.getFLOW());
return InvocationResponse.CONTINUE;
}
try {
AxisService axisService = outMsgContext.getAxisService();
if(axisService == null) {
updateStatistics(outMsgContext);
return InvocationResponse.CONTINUE;
} else if (SystemFilter.isFilteredOutService(axisService.getAxisServiceGroup()) ||
axisService.isClientSide()) {
return InvocationResponse.CONTINUE;
}
final AxisOperation axisOperation = outMsgContext.getAxisOperation();
if(axisOperation != null && axisOperation.isControlOperation()){
return InvocationResponse.CONTINUE;
}
if (axisOperation != null) {
String mep = axisOperation.getMessageExchangePattern();
if (mep != null &&
(mep.equals(WSDL2Constants.MEP_URI_OUT_IN) ||
mep.equals(WSDL2Constants.MEP_URI_OUT_ONLY) ||
mep.equals(WSDL2Constants.MEP_URI_OUT_OPTIONAL_IN))) { // If this ConfigurationContext is used for sending messages out, do not change the stats
return InvocationResponse.CONTINUE;
}
// Process operation request count
Parameter inOpCounter =
axisOperation.getParameter(StatisticsConstants.IN_OPERATION_COUNTER);
if (inOpCounter != null) {
((AtomicInteger) inOpCounter.getValue()).incrementAndGet();
} else {
log.error(StatisticsConstants.IN_OPERATION_COUNTER +
" has not been set for operation " +
axisService.getName() + "." + axisOperation.getName());
return InvocationResponse.CONTINUE;
}
// Process operation response count
Parameter outOpCounter =
axisOperation.getParameter(StatisticsConstants.OUT_OPERATION_COUNTER);
if (outOpCounter != null) {
((AtomicInteger) outOpCounter.getValue()).incrementAndGet();
} else {
log.error(StatisticsConstants.OUT_OPERATION_COUNTER +
" has not been set for operation " +
axisService.getName() + "." + axisOperation.getName());
return InvocationResponse.CONTINUE;
}
}
updateStatistics(outMsgContext);
} catch (Throwable e) {
log.error("Could not call InOutMEPHandler.invoke", e);
}
return InvocationResponse.CONTINUE;
}