FaultBindingCollection.Add Method
.NET Framework 3.0
Adds the specified FaultBinding to the end of the FaultBindingCollection.
Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)
Assembly: System.Web.Services (in system.web.services.dll)
public int Add ( FaultBinding bindingOperationFault )
public function Add ( bindingOperationFault : FaultBinding ) : int
Not applicable.
Parameters
- bindingOperationFault
The FaultBinding to add to the collection.
Return Value
The zero-based index where the bindingOperationFault parameter has been added.FaultBindingCollection^ myFaultBindingCollection = myOperationBinding->Faults; FaultBinding^ myFaultBinding = gcnew FaultBinding; myFaultBinding->Name = "ErrorString"; // Associate SOAP fault binding to the fault binding of the operation. myExtensions = myFaultBinding->Extensions; SoapFaultBinding^ mySoapFaultBinding = gcnew SoapFaultBinding; mySoapFaultBinding->Use = SoapBindingUse::Literal; mySoapFaultBinding->Namespace = "http://www.contoso.com/stockquote"; myExtensions->Add( mySoapFaultBinding ); myFaultBindingCollection->Add( myFaultBinding );
FaultBindingCollection myFaultBindingCollection =
myOperationBinding.get_Faults();
FaultBinding myFaultBinding = new FaultBinding();
myFaultBinding.set_Name("ErrorString");
// Associate SOAP fault binding to the fault binding of the operation.
myExtensions = myFaultBinding.get_Extensions();
SoapFaultBinding mySoapFaultBinding = new SoapFaultBinding();
mySoapFaultBinding.set_Use(SoapBindingUse.Literal);
mySoapFaultBinding.set_Namespace("http://www.contoso.com/stockquote");
myExtensions.Add(mySoapFaultBinding);
myFaultBindingCollection.Add(myFaultBinding);
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: