This documentation is archived and is not being maintained.
SoapFaultBinding.Encoding Property
.NET Framework 1.1
Gets or sets a URI representing the encoding style used to encode the SOAP fault message.
[Visual Basic] Public Property Encoding As String [C#] public string Encoding {get; set;} [C++] public: __property String* get_Encoding(); public: __property void set_Encoding(String*); [JScript] public function get Encoding() : String; public function set Encoding(String);
Property Value
A string containing a URI. The default value is an empty string ("").
Remarks
The value of this property should be set only if the value of the Use property is Encoded.
Example
[Visual Basic] ' Create a new instance of 'SoapFaultBinding' class. Dim mySoapFaultBinding As New 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'. Dim myFaultBinding As New FaultBinding() myFaultBinding.Name = "AddFaultbinding" myFaultBinding.Extensions.Add(mySoapFaultBinding) ' Get existing 'OperationBinding' object. myOperationBinding.Faults.Add(myFaultBinding) myBinding.Operations.Add(myOperationBinding) [C#] // 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="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=new FaultBinding(); myFaultBinding.Name="AddFaultbinding"; myFaultBinding.Extensions.Add(mySoapFaultBinding); // Get existing 'OperationBinding' object. myOperationBinding.Faults.Add(myFaultBinding); myBinding.Operations.Add(myOperationBinding); [C++] // 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);
[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
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
SoapFaultBinding Class | SoapFaultBinding Members | System.Web.Services.Description Namespace
Show: