XmlDictionaryWriter.CreateMtomWriter 方法
定义
创建在消息传输优化机制 (MTOM) 格式中编写 XML 的 XmlDictionaryWriter 实例。Creates an instance of XmlDictionaryWriter that writes XML in the Message Transmission Optimization Mechanism (MTOM) format.
重载
| CreateMtomWriter(Stream, Encoding, Int32, String) |
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format. |
| CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) |
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format. |
注解
MTOM 允许用户优化 SOAP 消息内的原始二进制数据的传输。MTOM allows users to optimize the transmission of raw binary data within SOAP messages.
CreateMtomWriter(Stream, Encoding, Int32, String)
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.
public:
static System::Xml::XmlDictionaryWriter ^ CreateMtomWriter(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, int maxSizeInBytes, System::String ^ startInfo);
public static System.Xml.XmlDictionaryWriter CreateMtomWriter (System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo);
static member CreateMtomWriter : System.IO.Stream * System.Text.Encoding * int * string -> System.Xml.XmlDictionaryWriter
Public Shared Function CreateMtomWriter (stream As Stream, encoding As Encoding, maxSizeInBytes As Integer, startInfo As String) As XmlDictionaryWriter
参数
- 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
ContentType SOAP 标头中的属性。An attribute in the ContentType SOAP header.
返回
XmlDictionaryWriter 的一个实例。An instance of XmlDictionaryWriter.
适用于
CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)
创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.
public:
static System::Xml::XmlDictionaryWriter ^ CreateMtomWriter(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, int maxSizeInBytes, System::String ^ startInfo, System::String ^ boundary, System::String ^ startUri, bool writeMessageHeaders, bool ownsStream);
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);
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);
static member CreateMtomWriter : System.IO.Stream * System.Text.Encoding * int * string * string * string * bool * bool -> System.Xml.XmlDictionaryWriter
Public Shared Function CreateMtomWriter (stream As Stream, encoding As Encoding, maxSizeInBytes As Integer, startInfo As String, boundary As String, startUri As String, writeMessageHeaders As Boolean, ownsStream As Boolean) As XmlDictionaryWriter
参数
- 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
包含 Infoset 的 MIME 部分的内容类型。The content-type of the MIME part that contains the Infoset.
- boundary
- String
消息中的 MIME 边界。The MIME boundary in the message.
- startUri
- String
包含 Infoset 的 MIME 部分的内容 ID URI。The content-id URI of the MIME part that contains the Infoset.
- writeMessageHeaders
- Boolean
如果写入消息标头,则为 true。true to write message headers.
- ownsStream
- Boolean
如果指示完成时编写器关闭流,则为 true;否则为 false。true to indicate that the stream is closed by the writer when done; otherwise false.
返回
XmlDictionaryWriter 的一个实例。An instance of XmlDictionaryWriter.