本文整理汇总了Java中org.apache.axis2.description.AxisOperation.setOutputAction方法的典型用法代码示例。如果您正苦于以下问题:Java AxisOperation.setOutputAction方法的具体用法?Java AxisOperation.setOutputAction怎么用?Java AxisOperation.setOutputAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.AxisOperation
的用法示例。
在下文中一共展示了AxisOperation.setOutputAction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createServiceClient
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
private ServiceClient createServiceClient() throws AxisFault {
AxisService service = new AxisService("MultiHopRedirectService1");
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(
new Parameter(Constants.SERVICE_CLASS, MultiHopRedirectService1.class.getName()));
AxisOperation axisOp = new OutInAxisOperation(new QName("echoRedirect"));
axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
axisOp.setSoapAction(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect");
axisOp.setOutputAction(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect");
service.addOperation(axisOp);
service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect", axisOp);
ConfigurationContext configcontext = UtilServer.createClientConfigurationContext();
ServiceClient sender;
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setUseSeparateListener(true);
options.setTimeOutInMilliSeconds(5000);
sender = new ServiceClient(configcontext, service);
sender.setOptions(options);
sender.engageModule("addressing");
return sender;
}
示例2: processActionMappings
import org.apache.axis2.description.AxisOperation; //导入方法依赖的package包/类
/**
* Populate the AxisOperation with details from the actionMapping,
* outputActionMapping and faultActionMapping elements from the operation
* element.
*
* @param operation
* @param op_descrip
*/
protected void processActionMappings(OMElement operation,
AxisOperation op_descrip) {
Iterator mappingIterator = operation.getChildrenWithName(new QName(
Constants.ACTION_MAPPING));
ArrayList mappingList = new ArrayList();
while (mappingIterator.hasNext()) {
OMElement mappingElement = (OMElement) mappingIterator.next();
String inputActionString = mappingElement.getText().trim();
if (log.isTraceEnabled()) {
log.trace("Input Action Mapping found: " + inputActionString);
}
if (!"".equals(inputActionString)) {
mappingList.add(inputActionString);
} else {
if (log.isTraceEnabled()) {
log.trace("Zero length input action string found. Not added to mapping");
}
}
}
op_descrip.setWsamappingList(mappingList);
OMElement outputAction = operation.getFirstChildWithName(new QName(
Constants.OUTPUT_ACTION_MAPPING));
if ((outputAction != null) && (outputAction.getText() != null)) {
String outputActionString = outputAction.getText().trim();
if (log.isTraceEnabled()) {
log.trace("Output Action Mapping found: " + outputActionString);
}
op_descrip.setOutputAction(outputActionString);
}
Iterator faultActionsIterator = operation
.getChildrenWithName(new QName(Constants.FAULT_ACTION_MAPPING));
while (faultActionsIterator.hasNext()) {
OMElement faultMappingElement = (OMElement) faultActionsIterator
.next();
String faultActionString = faultMappingElement.getText().trim();
String faultActionName = faultMappingElement
.getAttributeValue(new QName(Constants.FAULT_ACTION_NAME));
if (faultActionName != null && faultActionString != null) {
if (log.isTraceEnabled()) {
log.trace("Fault Action Mapping found: " + faultActionName
+ ", " + faultActionString);
}
op_descrip.addFaultAction(faultActionName, faultActionString);
}
}
}