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.
System.Object
System.Web.Services.Description.DocumentableItem
System.Web.Services.Description.MessageBinding
System.Web.Services.Description.FaultBinding
[Visual Basic] NotInheritable Public Class FaultBinding Inherits MessageBinding [C#] public sealed class FaultBinding : MessageBinding [C++] public __gc __sealed class FaultBinding : public MessageBinding [JScript] 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.
Remarks
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 http://www.w3.org/TR/wsdl/.
Example
[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 = "http://www.contoso.com/stockquote" myExtensions.Add(mySoapFaultBinding) myFaultBindingCollection.Add(myFaultBinding) [C#] 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 = "http://www.contoso.com/stockquote"; myExtensions.Add(mySoapFaultBinding); myFaultBindingCollection.Add(myFaultBinding); [C++] 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"http://www.contoso.com/stockquote"; myExtensions->Add(mySoapFaultBinding); myFaultBindingCollection->Add(myFaultBinding);
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
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