This topic has not yet been rated - Rate this topic

TextMessageEncodingBindingElement Class

The binding element that specifies the character encoding and message versioning used for text-based SOAP messages.

System.Object
  System.ServiceModel.Channels.BindingElement
    System.ServiceModel.Channels.MessageEncodingBindingElement
      System.ServiceModel.Channels.TextMessageEncodingBindingElement

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public sealed class TextMessageEncodingBindingElement : MessageEncodingBindingElement, 
	IWsdlExportExtension, IPolicyExportExtension

The TextMessageEncodingBindingElement type exposes the following members.

  Name Description
Public method Supported by Portable Class Library TextMessageEncodingBindingElement() Initializes a new instance of the TextMessageEncodingBindingElement class.
Public method Supported by Portable Class Library TextMessageEncodingBindingElement(MessageVersion, Encoding) Initializes a new instance of the TextMessageEncodingBindingElement class with a specified message version and encoding.
Top
  Name Description
Public property MaxReadPoolSize Gets or sets the number of readers that are allocated to a pool and ready for use to process incoming messages.
Public property MaxWritePoolSize Gets or sets the number of writers that are allocated to a pool and ready for use to process outgoing messages.
Public property Supported by Portable Class Library MessageVersion Gets or sets the SOAP and WS-Addressing versions that are used to format the text message. (Overrides MessageEncodingBindingElement.MessageVersion.)
Public property ReaderQuotas Gets or sets constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.
Public property Supported by Portable Class Library WriteEncoding Gets or sets the encoding that is used to format the characters in the text message.
Top
  Name Description
Public method Supported by Portable Class Library BuildChannelFactory<TChannel> Builds the channel factory stack on the client that creates a specified type of channel for a specified context. (Overrides BindingElement.BuildChannelFactory<TChannel>(BindingContext).)
Public method BuildChannelListener<TChannel> Builds the channel listener on the service that accepts a specified type of channel for a specified context. (Overrides BindingElement.BuildChannelListener<TChannel>(BindingContext).)
Public method Supported by Portable Class Library CanBuildChannelFactory<TChannel> Returns a value that indicates whether the binding element can build a channel factory for a specific type of channel. (Inherited from BindingElement.)
Public method CanBuildChannelListener<TChannel> Returns a value that indicates whether the current binding can build a listener for a specified type of channel and context. (Overrides BindingElement.CanBuildChannelListener<TChannel>(BindingContext).)
Public method Supported by Portable Class Library Clone Creates a new TextMessageEncodingBindingElement object initialized from the current one. (Overrides BindingElement.Clone().)
Public method Supported by Portable Class Library CreateMessageEncoderFactory Creates a factory for text message encoders that employs the message version and character encoding specified by the current encoding binding element. (Overrides MessageEncodingBindingElement.CreateMessageEncoderFactory().)
Public method Supported by Portable Class Library Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Supported by Portable Class Library Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Supported by Portable Class Library GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetProperty<T> Returns a typed object requested, if present, from the appropriate layer in the binding element stack. (Overrides MessageEncodingBindingElement.GetProperty<T>(BindingContext).)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ShouldSerializeReaderQuotas Returns whether the constraints placed on the complexity of SOAP message structure should be serialized.
Public method ShouldSerializeWriteEncoding Returns whether the Encoding that is used to format the message characters should be serialized.
Public method Supported by Portable Class Library ToString Returns a string that represents the current object. (Inherited from Object.)
Top
  Name Description
Explicit interface implemetation Private method IPolicyExportExtension.ExportPolicy Generates WSDL contract information from encoding policies contained in the binding element.
Explicit interface implemetation Private method IWsdlExportExtension.ExportContract Generates WSDL contract information from encoding policies contained in the binding element.
Explicit interface implemetation Private method IWsdlExportExtension.ExportEndpoint Generates WSDL contract information from encoding policies contained in the binding element.
Top

Encoding is the process of transforming a message into a sequence of bytes. Decoding is the reverse process. includes three types of encoding for SOAP messages: Text, Binary and Message Transmission Optimization Mechanism (MTOM).

The text encoding represented by the TextMessageEncodingBindingElement is the most interoperable, but the least efficient encoder for XML messages. Web service or Web service client can generally understand textual XML. However, transmitting large blocks of binary data as text is not efficient.

For more information about the binding element that specifies messages are encoded using the .NET Binary Format for XML, see BinaryMessageEncodingBindingElement.

For more information about the binding element that specifies messages are encoded using the MTOM message encoding, see MtomMessageEncodingBindingElement.

For more information about how to implement a custom message encoder, use the MessageEncodingBindingElement class.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ