SoapBodyBinding.Encoding Property
Gets or sets a string containing a list of space-delimited URIs. The URIs represent the encoding style (or styles) to be used to encode messages within the SOAP body.
[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 list of URIs. 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. Otherwise this property value will be ignored.
Example
[Visual Basic] Dim mySoapBodyBinding As New SoapBodyBinding() ' Encode SOAP body using rules specified by the 'Encoding' property. mySoapBodyBinding.Use = SoapBindingUse.Encoded ' Set URI representing the encoding style for encoding the body. mySoapBodyBinding.Encoding = "http://schemas.xmlsoap.org/soap/encoding/" ' Set the Uri representing the location of the specification ' for encoding of content not defined by 'Encoding' property'. mySoapBodyBinding.Namespace = "http://tempuri.org/soapsvcmgr/" myInputBinding.Extensions.Add(mySoapBodyBinding) [C#] SoapBodyBinding mySoapBodyBinding = new SoapBodyBinding(); // Encode SOAP body using rules specified by the 'Encoding' property. mySoapBodyBinding.Use = SoapBindingUse.Encoded; // Set URI representing the encoding style for encoding the body. mySoapBodyBinding.Encoding="http://schemas.xmlsoap.org/soap/encoding/"; // Set the Uri representing the location of the specification // for encoding of content not defined by 'Encoding' property'. mySoapBodyBinding.Namespace="http://tempuri.org/soapsvcmgr/"; myInputBinding.Extensions.Add(mySoapBodyBinding); [C++] SoapBodyBinding* mySoapBodyBinding = new SoapBodyBinding(); // Encode SOAP body using rules specified by the 'Encoding' property. mySoapBodyBinding->Use = SoapBindingUse::Encoded; // Set URI representing the encoding style for encoding the body. mySoapBodyBinding->Encoding=S"http://schemas.xmlsoap.org/soap/encoding/"; // Set the Uri representing the location of the specification // for encoding of content not defined by 'Encoding' property'. mySoapBodyBinding->Namespace=S"http://tempuri.org/soapsvcmgr/"; myInputBinding->Extensions->Add(mySoapBodyBinding);
[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
SoapBodyBinding Class | SoapBodyBinding Members | System.Web.Services.Description Namespace