SOAPFaultException (Java EE 5)

Java EE API


javax.xml.rpc.soap Class SOAPFaultException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.xml.rpc.soap.SOAPFaultException
All Implemented Interfaces:
Serializable

public class SOAPFaultException
extends RuntimeException

Extends: Throwable > Exception > RuntimeException

SOAPFaultException 异常表示 SOAP 错误。

SOAP 错误中的消息部分映射到 faultdetail 元素的内容,该元素可通过对 SOAPFaultException 调用 getDetail 方法进行访问。javax.xml.soap.SOAPFactory 上的 createDetail 方法可以创建一个 javax.xml.soap.Detail 实例。

faultstring 提供人类可读的 SOAP 错误描述。faultcode 元素提供 SOAP 错误的算法映射。

有关 SOAP 错误的更多细节,请参见 SOAP 1.1 和 WSDL 1.1 规范。

英文文档:

The SOAPFaultException exception represents a SOAP fault.

The message part in the SOAP fault maps to the contents of faultdetail element accessible through the getDetail method on the SOAPFaultException. The method createDetail on the javax.xml.soap.SOAPFactory creates an instance of the javax.xml.soap.Detail.

The faultstring provides a human-readable description of the SOAP fault. The faultcode element provides an algorithmic mapping of the SOAP fault.

Refer to SOAP 1.1 and WSDL 1.1 specifications for more details of the SOAP faults.

Version:
1.0
Author:
Rahul Sharma
See Also:
Detail, SOAPFactory.createDetail(), Serialized Form

Constructor Summary
 
Method Summary
 Detail
 String
 QName
 String
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public SOAPFaultException(javax.xml.namespace.QName faultcode, String faultstring, String faultactor, Detail faultdetail)
SOAPFaultException 的构造方法。
faultCode SOAP faultcode 的 QName
faultstring SOAP 错误的 faultstring 元素
faultactor SOAP 错误的 faultactor 元素
faultdetail SOAP 错误的 faultdetail 元素
See also createDetail
英文文档:

SOAPFaultException

public SOAPFaultException(QName faultcode,
                          String faultstring,
                          String faultactor,
                          Detail faultdetail)
Constructor for the SOAPFaultException

Parameters:
faultCode - QName for the SOAP faultcode
faultstring - faultstring element of SOAP fault
faultactor - faultactor element of SOAP fault
faultdetail - faultdetail element of SOAP fault
See Also:
SOAPFactory.createDetail()

Method Detail

public javax.xml.namespace.QName getFaultCode()
获取 faultcode 元素。faultcode 元素提供标识错误的算法机制。SOAP 定义涵盖基本 SOAP 错误的一个小型 SOAP 错误集。
return faultcode 元素的 QName
英文文档:

getFaultCode

public QName getFaultCode()
Gets the faultcode element. The faultcode element provides an algorithmic mechanism for identifying the fault. SOAP defines a small set of SOAP fault codes covering basic SOAP faults.

Returns:
QName of the faultcode element

public String getFaultString()
获取 faultstring 元素。faultstring 提供人类可读的 SOAP 错误描述,不用于算法处理。
return SOAP 错误的 faultstring 元素
英文文档:

getFaultString

public String getFaultString()
Gets the faultstring element. The faultstring provides a human-readable description of the SOAP fault and is not intended for algorithmic processing.

Returns:
faultstring element of the SOAP fault

public String getFaultActor()
获取 faultactor 元素。faultactor 元素指示 SOAP 消息路径上的哪个 SOAP 节点是错误发生的原因。它指示错误来源。
return SOAP 错误的 faultactor 元素
英文文档:

getFaultActor

public String getFaultActor()
Gets the faultactor element. The faultactor element provides information about which SOAP node on the SOAP message path caused the fault to happen. It indicates the source of the fault.

Returns:
faultactor element of the SOAP fault

public Detail getDetail()
获取 detail 元素。detail 元素用于携带与 SOAP 正文有关的特定于应用程序的错误信息。
detail 错误的 detail 元素
See also javax.xml.soap.Detail
英文文档:

getDetail

public Detail getDetail()
Gets the detail element. The detail element is intended for carrying application specific error information related to the SOAP Body.

Parameters:
detail - element of the SOAP fault
See Also:
Detail


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!