FaultCode FaultCode FaultCode FaultCode Class

定义

表示 SOAP 错误代码。Represents a SOAP fault code.

public ref class FaultCode
public class FaultCode
type FaultCode = class
Public Class FaultCode
继承
FaultCodeFaultCodeFaultCodeFaultCode

注解

错误代码提供了一个计算机可读标识符,可用于以编程方式标识错误条件并在适当时进行响应。Fault code provides a machine-readable identifier that can be used to programmatically identify the error condition and respond as appropriate. SOAP 规范定义了下列特定于 SOAP 1.1 和 1.2 的错误代码。The SOAP specifications define the following fault codes specific to SOAP 1.1 and 1.2.

  • SOAP 1.1。SOAP 1.1. VersionMismatchMustUnderstandClientServerVersionMismatch, MustUnderstand, Client, and Server.

  • SOAP 1.2。SOAP 1.2. VersionMismatchMustUnderstandDataEncodingUnknown、和ReceiverSenderVersionMismatch, MustUnderstand, DataEncodingUnknown, Sender, and Receiver.

除了 SOAP 规范所定义的错误代码外, Windows Communication Foundation (WCF) 还使用其实现的每个 Web 服务规范定义的错误代码。In addition to those fault codes defined by the SOAP specifications, Windows Communication Foundation (WCF) uses fault codes defined by each Web services specification that it implements.

构造函数

FaultCode(String) FaultCode(String) FaultCode(String) FaultCode(String)

初始化 FaultCode 类的新实例。Initializes a new instance of the FaultCode class.

FaultCode(String, FaultCode) FaultCode(String, FaultCode) FaultCode(String, FaultCode) FaultCode(String, FaultCode)

初始化 FaultCode 类的新实例。Initializes a new instance of the FaultCode class.

FaultCode(String, String) FaultCode(String, String) FaultCode(String, String) FaultCode(String, String)

用指定的名称和命名空间初始化 FaultCode 类的新实例。Initializes a new instance of the FaultCode class with the specified name and namespace.

FaultCode(String, String, FaultCode) FaultCode(String, String, FaultCode) FaultCode(String, String, FaultCode) FaultCode(String, String, FaultCode)

使用指定的名称、命名空间和错误子代码初始化 FaultCode 类的新实例。Initializes a new instance of the FaultCode class with the specified name, namespace, and fault subcode.

属性

IsPredefinedFault IsPredefinedFault IsPredefinedFault IsPredefinedFault

获取一个值,该值指示错误为 SOAP 1.1 错误还是 SOAP 1.2 错误。Gets a value that indicates whether the fault is a SOAP 1.1 or SOAP 1.2 fault.

IsReceiverFault IsReceiverFault IsReceiverFault IsReceiverFault

获取一个值,该值指示错误为 SOAP 1.1 服务器错误还是 SOAP 1.2 接收方错误。Gets a value that indicates whether the fault is a SOAP 1.1 server fault or a SOAP 1.2 receiver fault.

IsSenderFault IsSenderFault IsSenderFault IsSenderFault

获取一个值,该值指示错误为 SOAP 1.1 客户端错误还是 SOAP 1.2 发送方错误。Gets a value that indicates whether the fault is a SOAP 1.1 client fault or a SOAP 1.2 sender fault.

Name Name Name Name

获取错误代码的本地名称。Gets the local name of the fault code.

Namespace Namespace Namespace Namespace

获取错误代码的命名空间。Gets the namespace for the fault code.

SubCode SubCode SubCode SubCode

获取错误子代码。Gets the fault subcode.

方法

CreateReceiverFaultCode(FaultCode) CreateReceiverFaultCode(FaultCode) CreateReceiverFaultCode(FaultCode) CreateReceiverFaultCode(FaultCode)

使用指定的子代码创建接收方错误代码。Creates a receiver fault code with the specified subcode.

CreateReceiverFaultCode(String, String) CreateReceiverFaultCode(String, String) CreateReceiverFaultCode(String, String) CreateReceiverFaultCode(String, String)

使用指定的子代码创建接收方错误代码。Creates a receiver fault code with the specified subcode.

CreateSenderFaultCode(FaultCode) CreateSenderFaultCode(FaultCode) CreateSenderFaultCode(FaultCode) CreateSenderFaultCode(FaultCode)

使用指定的子代码创建发送方错误代码。Creates a sender fault code with the specified subcode.

CreateSenderFaultCode(String, String) CreateSenderFaultCode(String, String) CreateSenderFaultCode(String, String) CreateSenderFaultCode(String, String)

使用指定的子代码创建发送方错误代码。Creates a sender fault code with the specified subcode.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于