MessageHeaderArrayAttribute Class

Specifies that the default wrapper element in the SOAP message must not be written around array types in a header element.

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

[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false, 
	Inherited = false)]
public sealed class MessageHeaderArrayAttribute : MessageHeaderAttribute

Use the MessageHeaderArrayAttribute attribute to turn off the standard array wrapper element when you want to emit an unbounded number of identical elements either inside the <soap:Header> directly or inside the first and only child of <soap:Header> without the default wrapper element for array types.

MessageHeaderArrayAttribute can be applied only to members of an array type. If specified, the Name and Namespace are used as the name and namespace of the element of each array item. If not specified, the array item elements are named using the same convention used for naming non-repeating body parts. For more information, see Name and Namespace.

For information about controlling the serialization of the contents of a SOAP body without modifying the default SOAP envelope itself, see System.Runtime.Serialization.DataContractAttribute, Specifying Data Transfer in Service Contracts, and Data Contracts Overview.

For more information about creating message contracts, see Using Message Contracts.

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft