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


Java Operation.getFault方法代码示例

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


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

示例1: getFaultAction

import javax.wsdl.Operation; //导入方法依赖的package包/类
/**
 * Get the fault action value for a given operation.
 *
 * @param port The WSDL service port.
 * @param operationName The SOAP Operation element QName.
 * @param faultName The fault name.
 * @param documentStyle true if it is 'document', false if 'rpc'.
 * @return the fault action value.
 */
public static String getFaultAction(final Port port, final QName operationName, String faultName, Boolean documentStyle) {
    // Overloaded methods not supported
    Operation operation = getOperationByElement(port, operationName, documentStyle);

    if (operation.getFault(faultName) == null) {
        throw SOAPMessages.MESSAGES.faultNameNotFoundOnOperation(faultName, operationName.getLocalPart());
    }
    return getFaultAction(operation.getFault(faultName), port, operationName);

}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:20,代码来源:WSDLUtil.java

示例2: getFaultQName

import javax.wsdl.Operation; //导入方法依赖的package包/类
/**
 * Get the fault QName.
 *
 * @param operation The WSDL operation.
 * @param faultName the name of the Fault
 * @return the fault QName or null.
 */
public static QName getFaultQName(final Operation operation, final String faultName) {
    Fault fault = operation.getFault(faultName);
    QName qName = null;
    if (fault != null) {
        qName = fault.getMessage().getQName();
    }
    return qName;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:16,代码来源:WSDLUtil.java

示例3: buildSoapDetail

import javax.wsdl.Operation; //导入方法依赖的package包/类
private static OMElement buildSoapDetail(
        final BPELMessageContext bpelMessageContext,
        final MessageExchange odeMessageContext) throws AxisFault {
    Element message = odeMessageContext.getResponse().getMessage();
    QName faultName = odeMessageContext.getFault();
    Operation operation = odeMessageContext.getOperation();
    SOAPFactory soapFactory = bpelMessageContext.getSoapFactoryForCurrentMessageFlow();

    if (faultName.getNamespaceURI() == null) {
        return toFaultDetail(message, soapFactory);
    }
    Fault f = operation.getFault(faultName.getLocalPart());
    if (f == null) {
        return toFaultDetail(message, soapFactory);
    }

    // For faults, there will be exactly one part.
    Part p = (Part) f.getMessage().getParts().values().iterator().next();
    if (p == null) {
        return toFaultDetail(message, soapFactory);
    }
    Element partEl = DOMUtils.findChildByName(message, new QName(null, p.getName()));
    if (partEl == null) {
        return toFaultDetail(message, soapFactory);
    }
    Element detail = DOMUtils.findChildByName(partEl, p.getElementName());
    if (detail == null) {
        return toFaultDetail(message, soapFactory);
    }

    return OMUtils.toOM(detail, soapFactory);
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:33,代码来源:SOAPUtils.java

示例4: testGenerateFaultAction

import javax.wsdl.Operation; //导入方法依赖的package包/类
public void testGenerateFaultAction() {
    String expectedAction =
            "http://ws.apache.org/axis2/actiontest/withoutWSAWAction/echo/Fault/echoFault";
    PortType pt = definition.getPortType(
            new QName("http://ws.apache.org/axis2/actiontest/", "withoutWSAWAction"));
    List operations = pt.getOperations();
    Operation op = (Operation) operations.get(0);
    Fault fault = op.getFault("echoFault");
    String actualAction =
            WSDL11ActionHelper.getActionFromFaultElement(definition, pt, op, fault);
    assertEquals(expectedAction, actualAction);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:13,代码来源:WSDL11ActionHelperTest.java

示例5: testGetWSAWFaultAction

import javax.wsdl.Operation; //导入方法依赖的package包/类
public void testGetWSAWFaultAction() {
    String expectedAction = "http://example.org/action/echoFault";
    PortType pt = definition
            .getPortType(new QName("http://ws.apache.org/axis2/actiontest/", "withWSAWAction"));
    List operations = pt.getOperations();
    Operation op = (Operation) operations.get(0);
    Fault fault = op.getFault("echoFault");
    String actualAction =
            WSDL11ActionHelper.getActionFromFaultElement(definition, pt, op, fault);
    assertEquals(expectedAction, actualAction);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:WSDL11ActionHelperTest.java


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