Message.CreateMessage Method (MessageVersion, String, BodyWriter)

Creates a message with a body that consists of an array of bytes.

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

public static Message CreateMessage(
	MessageVersion version,
	string action,
	BodyWriter body
)

Parameters

version
Type: System.ServiceModel.Channels.MessageVersion
A MessageVersion object that specifies the SOAP version to use for the message.
action
Type: System.String
A description of how the message should be processed.
body
Type: System.ServiceModel.Channels.BodyWriter
A BodyWriter of type byte.

Return Value

Type: System.ServiceModel.Channels.Message
A Message object for the message created.

ExceptionCondition
ArgumentNullException

version, action or body is null.

An empty message is useful for an endpoint to send an alert to another endpoint without any actual content.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: