Share via


<textMessageEncoding> (Silverlight)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

The element that specifies the type of character encoding and the envelope version used for text-based SOAP messages.

Syntax

<textMessageEncoding 
   messageVersion="None/Soap11/Soap12WSAddressing10"
   writeEncoding=”UnicodeFffeTextEncoding/Utf16TextEncoding/Utf8TextEncoding" />

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

messageVersion

Specifies the SOAP version of the messages sent using the binding. The default is Soap12WSAddressing10. This attribute is of type MessageVersion.

writeEncoding

Specifies the character set encoding to be used for emitting messages on the binding. The default is Utf8TextEncoding. This attribute is of type Encoding.

Child Elements

Element Description

None.

Parent Elements

Element Description

<binding> of <customBinding> (Silverlight)

Defines the binding capabilities of the custom binding used to configure communications of Silverlight client with services that expose endpoints that do not conform to WS-I BP 1.1 or when you want full control over the message stack.

Text Value

Remarks

Encoding is the process of transforming a message into a sequence of bytes. Decoding is the reverse process. The text encoder creates text-based messages on the wire. Messages produced by this encoder are suitable for WS-* based interop. A Web service or Web service client can generally understand textual XML.

Example

The code example shows how to specify the message version and type of text encoding using this configuration element.

<textMessageEncoding 
    messageVersion="Soap12Addressing10"
    textEncoding=”utf-8” />