org.codehaus.enunciate.contract.jaxws.WebFault.findExplicitFaultBean()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebFault.findExplicitFaultBean()方法的一些代码示例,展示了WebFault.findExplicitFaultBean()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebFault.findExplicitFaultBean()方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxws.WebFault
类名称:WebFault
方法名:findExplicitFaultBean

WebFault.findExplicitFaultBean介绍

[英]A web fault has an explicit fault bean if all three of the following are present:

  1. A getFaultInfo method that returns the bean instance of a class type.
  2. A constructor taking a message and bean instance.
  3. A constructor taking a message, a bean instance, and a cause.
    [中]如果存在以下三种情况,则web故障具有显式故障bean:
    1.返回类类型的bean实例的getFaultInfo方法。
    1.获取消息和bean实例的构造函数。
    1.获取消息、bean实例和原因的构造函数。

代码示例

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

/**
 * The qname reference to the fault info.
 *
 * @return The qname reference to the fault info.
 */
public QName getParticleQName() {
 ElementDeclaration faultBean = findExplicitFaultBean();
 if (faultBean != null) {
  return new QName(faultBean.getNamespace(), faultBean.getName());
 }
 else {
  return new QName(getTargetNamespace(), getElementName());
 }
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-xfire-client

ElementDeclaration explicitFaultBean = webFault.findExplicitFaultBean();
String faultElementName = explicitFaultBean == null ? webFault.getElementName() : explicitFaultBean.getName();
String faultElementNamespace = explicitFaultBean == null ? webFault.getTargetNamespace() : explicitFaultBean.getNamespace();

相关文章