This documentation is archived and is not being maintained.

FaultBinding Class

Specifies the format for any error messages that might be output as a result of the operation. This class cannot be inherited.

For a list of all members of this type, see FaultBinding Members.


[Visual Basic]
NotInheritable Public Class FaultBinding
   Inherits MessageBinding
public sealed class FaultBinding : MessageBinding
public __gc __sealed class FaultBinding : public MessageBinding
public class FaultBinding extends MessageBinding

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The FaultBinding class corresponds to the Web Services Description Language (WSDL) <fault> element enclosed by the <operation> element, which in turn corresponds to the OperationBinding class. For more information about WSDL, see the specification at


[Visual Basic, C#, C++] The following example demonstrates a typical use of the FaultBinding class.

[Visual Basic] 
Dim myFaultBindingCollection As FaultBindingCollection = myOperationBinding.Faults
Dim myFaultBinding As New FaultBinding()
myFaultBinding.Name = "ErrorString"
' Associate SOAP fault binding to the fault binding of the operation.
myExtensions = myFaultBinding.Extensions
Dim mySoapFaultBinding As New SoapFaultBinding()
mySoapFaultBinding.Use = SoapBindingUse.Literal
mySoapFaultBinding.Namespace = ""

FaultBindingCollection myFaultBindingCollection = myOperationBinding.Faults;
FaultBinding myFaultBinding = new FaultBinding();
myFaultBinding.Name = "ErrorString";
// Associate SOAP fault binding to the fault binding of the operation.
myExtensions = myFaultBinding.Extensions;
SoapFaultBinding mySoapFaultBinding = new SoapFaultBinding();
mySoapFaultBinding.Use = SoapBindingUse.Literal;
mySoapFaultBinding.Namespace = "";

FaultBindingCollection * myFaultBindingCollection = myOperationBinding->Faults;
FaultBinding* myFaultBinding = new FaultBinding();
myFaultBinding->Name = S"ErrorString";
// Associate SOAP fault binding to the fault binding of the operation.
myExtensions = myFaultBinding->Extensions;
SoapFaultBinding* mySoapFaultBinding = new SoapFaultBinding();
mySoapFaultBinding->Use = SoapBindingUse::Literal;
mySoapFaultBinding->Namespace = S"";

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.Web.Services.Description

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web.Services (in System.Web.Services.dll)

See Also

FaultBinding Members | System.Web.Services.Description Namespace