SoapBodyBinding.Encoding Property

Definition

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.

C#
public string Encoding { get; set; }

Property Value

A string containing a list of URIs. The default value is an empty string ("").

Examples

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);

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.

Applies to

Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)