CreateMessage Method (MessageVersion, String, BodyWriter)

Message.CreateMessage Method (MessageVersion, String, BodyWriter)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft