XmlDictionaryWriter.CreateMtomWriter Method

Definition

Creates an instance of XmlDictionaryWriter that writes XML in the Message Transmission Optimization Mechanism (MTOM) format.

Overloads

CreateMtomWriter(Stream, Encoding, Int32, String)

Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.

CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)

Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.

Remarks

MTOM allows users to optimize the transmission of raw binary data within SOAP messages.

CreateMtomWriter(Stream, Encoding, Int32, String)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.

C#
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo);

Parameters

stream
Stream

The stream to write to.

encoding
Encoding

The character encoding of the stream.

maxSizeInBytes
Int32

The maximum number of bytes that are buffered in the writer.

startInfo
String

An attribute in the ContentType SOAP header.

Returns

An instance of XmlDictionaryWriter.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 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, 2.1

CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)

Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs
Source:
XmlDictionaryWriter.cs

Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.

C#
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo, string? boundary, string? startUri, bool writeMessageHeaders, bool ownsStream);
C#
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo, string boundary, string startUri, bool writeMessageHeaders, bool ownsStream);

Parameters

stream
Stream

The stream to write to.

encoding
Encoding

The character encoding of the stream.

maxSizeInBytes
Int32

The maximum number of bytes that are buffered in the writer.

startInfo
String

The content-type of the MIME part that contains the Infoset.

boundary
String

The MIME boundary in the message.

startUri
String

The content-id URI of the MIME part that contains the Infoset.

writeMessageHeaders
Boolean

true to write message headers.

ownsStream
Boolean

true to indicate that the stream is closed by the writer when done; otherwise false.

Returns

An instance of XmlDictionaryWriter.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 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, 2.1