SoapFaultBinding.Use Property
.NET Framework 2.0
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)
Assembly: System.Web.Services (in system.web.services.dll)
public: property SoapBindingUse Use { SoapBindingUse get (); void set (SoapBindingUse value); }
/** @property */ public SoapBindingUse get_Use () /** @property */ public void set_Use (SoapBindingUse value)
public function get Use () : SoapBindingUse public function set Use (value : SoapBindingUse)
Not applicable.
Property Value
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.set_Use(SoapBindingUse.Encoded);
// Set the URI representing the encoding style.
mySoapFaultBinding.set_Encoding("http://tempuri.org/stockquote");
// Set the URI representing the location of the specification
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding.set_Namespace("http://tempuri.org/stockquote");
// Create a new instance of 'FaultBinding'.
FaultBinding myFaultBinding = new FaultBinding();
myFaultBinding.set_Name("AddFaultbinding");
myFaultBinding.get_Extensions().Add(mySoapFaultBinding);
// Get existing 'OperationBinding' object.
myOperationBinding.get_Faults().Add(myFaultBinding);
myBinding.get_Operations().Add(myOperationBinding);
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: