This documentation is archived and is not being maintained.

SoapFaultBinding::Use Property

Specifies whether the fault message is encoded using rules specified by the Encoding property, or is encapsulated within a concrete XML schema.

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

public:
property SoapBindingUse Use {
	SoapBindingUse get ();
	void set (SoapBindingUse value);
}

Property Value

Type: System.Web.Services.Description::SoapBindingUse
One of the SoapBindingUse values. The default is Default.

// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding^ mySoapFaultBinding = gcnew SoapFaultBinding;

// Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding->Use = SoapBindingUse::Encoded;

// Set the URI representing the encoding style.
mySoapFaultBinding->Encoding = "http://tempuri.org/stockquote";

// Set the URI representing the location of the specification 
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding->Namespace = "http://tempuri.org/stockquote";

// Create a new instance of 'FaultBinding'.
FaultBinding^ myFaultBinding = gcnew FaultBinding;
myFaultBinding->Name = "AddFaultbinding";
myFaultBinding->Extensions->Add( mySoapFaultBinding );

// Get existing 'OperationBinding' object.
myOperationBinding->Faults->Add( myFaultBinding );
myBinding->Operations->Add( myOperationBinding );
// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding* mySoapFaultBinding = new SoapFaultBinding();
// Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding->Use=SoapBindingUse::Encoded;
// Set the URI representing the encoding style.
mySoapFaultBinding->Encoding=S"http://tempuri.org/stockquote";
// Set the URI representing the location of the specification
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding->Namespace=S"http://tempuri.org/stockquote";
// Create a new instance of 'FaultBinding'.
FaultBinding* myFaultBinding = new FaultBinding();
myFaultBinding->Name=S"AddFaultbinding";
myFaultBinding->Extensions->Add(mySoapFaultBinding);
// Get existing 'OperationBinding' object.
myOperationBinding->Faults->Add(myFaultBinding);
myBinding->Operations->Add(myOperationBinding);

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: