MessageHeader MessageHeader MessageHeader MessageHeader Class

Definition

Represents the content of a SOAP header.

public ref class MessageHeader abstract : System::ServiceModel::Channels::MessageHeaderInfo
public abstract class MessageHeader : System.ServiceModel.Channels.MessageHeaderInfo
type MessageHeader = class
    inherit MessageHeaderInfo
Public MustInherit Class MessageHeader
Inherits MessageHeaderInfo
Inheritance

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.

Windows Communication Foundation (WCF) 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.

Constructors

MessageHeader() MessageHeader() MessageHeader() MessageHeader()

Initializes a new instance of the MessageHeader class.

Properties

Actor Actor Actor Actor

Gets or sets the targeted recipient of the message header.

IsReferenceParameter IsReferenceParameter IsReferenceParameter IsReferenceParameter

Gets a value that specifies whether this message header contains reference parameters of an endpoint reference.

MustUnderstand MustUnderstand MustUnderstand MustUnderstand

Gets or sets a value that indicates whether the header must be understood, according to SOAP 1.1/1.2 specification.

Name Name Name Name

Gets the name of the message header.

(Inherited from MessageHeaderInfo)
Namespace Namespace Namespace Namespace

Gets the namespace of the message header.

(Inherited from MessageHeaderInfo)
Relay Relay Relay Relay

Gets a value that indicates whether the header should be relayed.

Methods

CreateHeader(String, String, Object) CreateHeader(String, String, Object) CreateHeader(String, String, Object) CreateHeader(String, String, Object)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, Boolean) CreateHeader(String, String, Object, Boolean) CreateHeader(String, String, Object, Boolean) CreateHeader(String, String, Object, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, Boolean, String) CreateHeader(String, String, Object, Boolean, String) CreateHeader(String, String, Object, Boolean, String) CreateHeader(String, String, Object, Boolean, String)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, Boolean, String, Boolean) CreateHeader(String, String, Object, Boolean, String, Boolean) CreateHeader(String, String, Object, Boolean, String, Boolean) CreateHeader(String, String, Object, Boolean, String, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer) CreateHeader(String, String, Object, XmlObjectSerializer) CreateHeader(String, String, Object, XmlObjectSerializer) CreateHeader(String, String, Object, XmlObjectSerializer)

Creates a header from an object to be serialized using the XmlFormatter.

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean) CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean)

Creates a new message header with the specified data.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
IsMessageVersionSupported(MessageVersion) IsMessageVersionSupported(MessageVersion) IsMessageVersionSupported(MessageVersion) IsMessageVersionSupported(MessageVersion)

Verifies whether the specified message version is supported.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnWriteHeaderContents(XmlDictionaryWriter, MessageVersion) OnWriteHeaderContents(XmlDictionaryWriter, MessageVersion) OnWriteHeaderContents(XmlDictionaryWriter, MessageVersion) OnWriteHeaderContents(XmlDictionaryWriter, MessageVersion)

Called when the header content is serialized using the specified XML writer.

OnWriteStartHeader(XmlDictionaryWriter, MessageVersion) OnWriteStartHeader(XmlDictionaryWriter, MessageVersion) OnWriteStartHeader(XmlDictionaryWriter, MessageVersion) OnWriteStartHeader(XmlDictionaryWriter, MessageVersion)

Called when the start header is serialized using the specified XML writer.

ToString() ToString() ToString() ToString()

Returns the string representation of this message header.

WriteHeader(XmlDictionaryWriter, MessageVersion) WriteHeader(XmlDictionaryWriter, MessageVersion) WriteHeader(XmlDictionaryWriter, MessageVersion) WriteHeader(XmlDictionaryWriter, MessageVersion)

Serializes the header using the specified XML writer.

WriteHeader(XmlWriter, MessageVersion) WriteHeader(XmlWriter, MessageVersion) WriteHeader(XmlWriter, MessageVersion) WriteHeader(XmlWriter, MessageVersion)

Serializes the header using the specified XML writer.

WriteHeaderAttributes(XmlDictionaryWriter, MessageVersion) WriteHeaderAttributes(XmlDictionaryWriter, MessageVersion) WriteHeaderAttributes(XmlDictionaryWriter, MessageVersion) WriteHeaderAttributes(XmlDictionaryWriter, MessageVersion)

Serializes the header attributes using the specified XML writer.

WriteHeaderContents(XmlDictionaryWriter, MessageVersion) WriteHeaderContents(XmlDictionaryWriter, MessageVersion) WriteHeaderContents(XmlDictionaryWriter, MessageVersion) WriteHeaderContents(XmlDictionaryWriter, MessageVersion)

Serializes the header contents using the specified XML writer.

WriteStartHeader(XmlDictionaryWriter, MessageVersion) WriteStartHeader(XmlDictionaryWriter, MessageVersion) WriteStartHeader(XmlDictionaryWriter, MessageVersion) WriteStartHeader(XmlDictionaryWriter, MessageVersion)

Serializes the start header using the specified XML writer.

Applies to