Export (0) Print
Expand All

Message.CreateMessage Method (XmlDictionaryReader, Int32, MessageVersion)

Creates a message using the specified reader, action and version.

Namespace: System.ServiceModel.Channels
Assembly: System.ServiceModel (in system.servicemodel.dll)

public static Message CreateMessage (
	XmlDictionaryReader envelopeReader,
	int maxSizeOfHeaders,
	MessageVersion version
)
public static Message CreateMessage (
	XmlDictionaryReader envelopeReader, 
	int maxSizeOfHeaders, 
	MessageVersion version
)
public static function CreateMessage (
	envelopeReader : XmlDictionaryReader, 
	maxSizeOfHeaders : int, 
	version : MessageVersion
) : Message
Not applicable.

Parameters

envelopeReader

The XmlDictionaryReader object to be used for reading the SOAP message.

maxSizeOfHeaders

The maximum size in bytes of a header.

version

A valid MessageVersion value that specifies the SOAP version to use for the message.

Return Value

A Message object for the message created.

Message takes ownership of envelopeReader.

This method reads the envelope, buffers all the headers into the header collection, and reads up to but not including the Body start tag, and returns the message. If the method call throws an exception, it closes the reader.

The body of the returned message can then be either read or written.

The message body can be read using the GetBody methods on the returned message. The returned object encapsulates all the child elements within the Body element. The message body can be written using WriteBody or WriteMessage. Once written, it cannot be read.

Closing the message closes the underlying envelope reader.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft