Compartir a través de


MessageHeader Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents the content of a SOAP header.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Channels.MessageHeaderInfo
    System.ServiceModel.Channels.MessageHeader

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

Syntax

'Declaration
Public MustInherit Class MessageHeader _
    Inherits MessageHeaderInfo
public abstract class MessageHeader : MessageHeaderInfo

The MessageHeader type exposes the following members.

Constructors

  Name Description
Protected methodSupported by Silverlight for Windows Phone MessageHeader Initializes a new instance of the MessageHeader class.

Top

Properties

  Name Description
Public propertySupported by Silverlight for Windows Phone Actor Gets or sets the targeted recipient of the message header. (Overrides MessageHeaderInfo.Actor.)
Public propertySupported by Silverlight for Windows Phone IsReferenceParameter Gets a value that specifies whether this message header contains reference parameters of an endpoint reference. (Overrides MessageHeaderInfo.IsReferenceParameter.)
Public propertySupported by Silverlight for Windows Phone MustUnderstand Gets or sets a value that indicates whether the header must be understood, according to SOAP 1.1 or 1.2 specification. (Overrides MessageHeaderInfo.MustUnderstand.)
Public propertySupported by Silverlight for Windows Phone Name Gets the name of the message header. (Inherited from MessageHeaderInfo.)
Public propertySupported by Silverlight for Windows Phone Namespace Gets the namespace of the message header. (Inherited from MessageHeaderInfo.)
Public propertySupported by Silverlight for Windows Phone Relay Gets a value that indicates whether the header should be relayed. (Overrides MessageHeaderInfo.Relay.)

Top

Methods

  Name Description
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object) Creates a new message header with the specified data.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, Boolean) Creates a new message header with the specified data.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, XmlObjectSerializer) Creates a header from an object to be serialized using the XmlFormatter.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, Boolean, String) Creates a new message header with the specified data.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, XmlObjectSerializer, Boolean) Creates a new message header with the specified data.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, Boolean, String, Boolean) Creates a new message header with the specified data.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String) Creates a new message header with the specified data.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean) Creates a new message header with the specified data.
Public methodSupported by Silverlight for Windows Phone Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows Phone Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone IsMessageVersionSupported Verifies whether the specified message version is supported.
Protected methodSupported by Silverlight for Windows Phone MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows Phone OnWriteHeaderContents Called when the header content is serialized using the specified XML writer.
Protected methodSupported by Silverlight for Windows Phone OnWriteStartHeader Called when the start header is serialized using the specified XML writer.
Public methodSupported by Silverlight for Windows Phone ToString Converts this message header to a string. (Overrides Object.ToString().)
Public methodSupported by Silverlight for Windows Phone WriteHeader(XmlDictionaryWriter, MessageVersion) Serializes the header using the specified XML writer.
Public methodSupported by Silverlight for Windows Phone WriteHeader(XmlWriter, MessageVersion) Serializes the header using the specified XML writer.
Protected methodSupported by Silverlight for Windows Phone WriteHeaderAttributes Serializes the header contents using the specified XML writer.
Public methodSupported by Silverlight for Windows Phone WriteHeaderContents Serializes the header contents using the specified XML writer.
Public methodSupported by Silverlight for Windows Phone WriteStartHeader Serializes the start header using the specified XML writer.

Top

Remarks

A message header contains optional metadata that describe a message encapsulated by the Message class.

A Message can have zero or more headers that are used as an extension mechanism to pass information in messages that are application specific. You can use Headers to add message headers to a message by calling the Add method.

Silverlight 5 provides a number of predefined message headers, as shown in the following table.

Header Name

Description

To

Contains the role that the message is targeting.

Action

Provides a description of how the message should be processed.

FaultTo

Contains the address of the node to which faults should be sent.

From

Contains the address of the node that sent the message.

Request

Indicates whether the message is a request.

MessageID

Contains the unique ID of the message.

RelatesTo

Contains the IDs of messages that are related to this message.

ReplyTo

Contains the address of the node to which a reply should be sent for a request.

Version Information

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

Platforms

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.