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


Java AxisOperation.setOutputAction方法代码示例

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

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


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