MtomMessageEncodingBindingElement MtomMessageEncodingBindingElement MtomMessageEncodingBindingElement Class


The binding element that specifies the encoding and versioning used for Message Transmission Optimization Mechanism (MTOM) messages.

public ref class MtomMessageEncodingBindingElement sealed : System::ServiceModel::Channels::MessageEncodingBindingElement, System::ServiceModel::Description::IPolicyExportExtension, System::ServiceModel::Description::IWsdlExportExtension
public sealed class MtomMessageEncodingBindingElement : System.ServiceModel.Channels.MessageEncodingBindingElement, System.ServiceModel.Description.IPolicyExportExtension, System.ServiceModel.Description.IWsdlExportExtension
Public NotInheritable Class MtomMessageEncodingBindingElement
Inherits MessageEncodingBindingElement
Implements IPolicyExportExtension, IWsdlExportExtension


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

The MtomMessageEncodingBindingElement represents the binding element that specifies the character encoding and message versioning and other settings used for messages using a Message Transmission Optimization Mechanism (MTOM) encoding. MTOM is an efficient technology for transmitting binary data in WCF messages. The MTOM encoder attempts to create a balance between efficiency and interoperability. The MTOM encoding transmits most XML in textual form, but optimizes large blocks of binary data by transmitting them as-is, without conversion to their base64 encoded format.

For more information about the binding element that specifies that messages are encoded using a textual representation of XML, see TextMessageEncodingBindingElement.

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

To implement a custom message encoder, use the MessageEncodingBindingElement class.


MtomMessageEncodingBindingElement() MtomMessageEncodingBindingElement() MtomMessageEncodingBindingElement()

Initializes a new instance of the MtomMessageEncodingBindingElement class.

MtomMessageEncodingBindingElement(MessageVersion, Encoding) MtomMessageEncodingBindingElement(MessageVersion, Encoding) MtomMessageEncodingBindingElement(MessageVersion, Encoding)

Initializes a new instance of the MtomMessageEncodingBindingElement class with a specified message version and character encoding.


MaxBufferSize MaxBufferSize MaxBufferSize

Gets or sets the maximum buffer size.

MaxReadPoolSize MaxReadPoolSize MaxReadPoolSize

Gets or sets the maximum number of XML readers that is allocated to a pool and is ready for use to process incoming messages.

MaxWritePoolSize MaxWritePoolSize MaxWritePoolSize

Gets or sets the maximum number of XML writers that is allocated to a pool and are ready for use to process outgoing messages.

MessageVersion MessageVersion MessageVersion

Gets or sets the SOAP message and WS-Addressing versions that are used or expected.

ReaderQuotas ReaderQuotas ReaderQuotas

Gets or sets constraints on the complexity of XML messages that can be processed by endpoints configured with this binding element.

WriteEncoding WriteEncoding WriteEncoding

Gets or sets the encoding that is used to format the characters in the text message.


BuildChannelFactory<TChannel>(BindingContext) BuildChannelFactory<TChannel>(BindingContext) BuildChannelFactory<TChannel>(BindingContext)

Builds the channel factory stack on the client that creates a specified type of channel for a specified context.

BuildChannelListener<TChannel>(BindingContext) BuildChannelListener<TChannel>(BindingContext) BuildChannelListener<TChannel>(BindingContext)

Builds the channel listener stack on the client that accepts a specified type of channel for a specified context.

CanBuildChannelFactory<TChannel>(BindingContext) CanBuildChannelFactory<TChannel>(BindingContext) CanBuildChannelFactory<TChannel>(BindingContext)

Returns a value that indicates whether the current binding can build a factory for a specified type of channel and context.

CanBuildChannelListener<TChannel>(BindingContext) CanBuildChannelListener<TChannel>(BindingContext) CanBuildChannelListener<TChannel>(BindingContext)

Returns a value that indicates whether the current binding can build a listener for a specified type of channel and context.

Clone() Clone() Clone()

Creates a new MtomMessageEncodingBindingElement object initialized from the current one.

CreateMessageEncoderFactory() CreateMessageEncoderFactory() CreateMessageEncoderFactory()

Creates a message encoder factory that encodes MTOM messages.

Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetProperty<T>(BindingContext) GetProperty<T>(BindingContext) GetProperty<T>(BindingContext)

Returns a typed object requested, if present, from the appropriate layer in the binding element stack.

GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ShouldSerializeMessageVersion() ShouldSerializeMessageVersion() ShouldSerializeMessageVersion()

Returns whether the SOAP message structure version should be serialized.

ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas()

Returns whether the constraints placed on the complexity of SOAP message structure should be serialized.

ShouldSerializeWriteEncoding() ShouldSerializeWriteEncoding() ShouldSerializeWriteEncoding()

Returns whether the Encoding that is used to format the message characters should be serialized.

ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IPolicyExportExtension.ExportPolicy(MetadataExporter, PolicyConversionContext) IPolicyExportExtension.ExportPolicy(MetadataExporter, PolicyConversionContext) IPolicyExportExtension.ExportPolicy(MetadataExporter, PolicyConversionContext)

Inserts a policy assertion into the WSDL, when it is generated, which indicates that an MTOM encoding is being used.

IWsdlExportExtension.ExportContract(WsdlExporter, WsdlContractConversionContext) IWsdlExportExtension.ExportContract(WsdlExporter, WsdlContractConversionContext) IWsdlExportExtension.ExportContract(WsdlExporter, WsdlContractConversionContext)

Modifies the WSDL contract for MTOM-specific information.

IWsdlExportExtension.ExportEndpoint(WsdlExporter, WsdlEndpointConversionContext) IWsdlExportExtension.ExportEndpoint(WsdlExporter, WsdlEndpointConversionContext) IWsdlExportExtension.ExportEndpoint(WsdlExporter, WsdlEndpointConversionContext)

Puts the SOAP message version into the WSDL.

Applies to