System.ServiceModel 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.All)

Use the attribute to specify the structure of the SOAP envelope for a particular message. Your service can then use the message as a parameter or return type in service operations. For information about controlling the serialization of the contents of a SOAP body without modifying the default SOAP envelope itself, see , Specifying Data Transfer in Service Contracts, and Data Contracts Overview.

You cannot use custom message types in your service operation with regular serializable parameters. Either use custom message types or serializable parameters that are not objects. For details, see , Specifying Data Transfer in Service Contracts.

To implement a message contract for a type, annotate it with and annotate one or more of the class's fields or properties with , , or .

is not a message contract attribute and cannot be used in conjunction with .

Use the and properties to specify the value of the <Action> element in the SOAP message.

Use the and properties to indicate whether the SOAP message type has a protection level, and if so, what it is.

Use the property to indicate whether the message body has a wrapper element, and if so, use the and properties to specify the name and namespace, respectively, of the wrapping element.

For more information, see Using Message Contracts.

Defines a strongly-typed class that corresponds to a SOAP message.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Property
  4.0.0.0
  System.Boolean To be added.

  If this setting is true, the protection level for the message is the value of . For details about protection levels and their assumptions and scopes, see Understanding Protection Level.

  Gets a value that indicates whether the message has a protection level.

- Property
  4.0.0.0
  System.Boolean To be added.

  Set the value of to false to suppress the wrapper element into which the message body is serialized.

  Gets or sets a value that specifies whether the message body has a wrapper element.

- Property
  4.0.0.0
  System.Net.Security.ProtectionLevel To be added.

  For details about protection levels and their assumptions and scopes, see Understanding Protection Level.

  Gets or sets a value that specified whether the message must be encrypted, signed, or both.

- Property
  4.0.0.0
  System.String To be added.

  Use the property to set the name of the wrapper element.

  Gets or sets the name of the wrapper element of the message body.

- Property
  4.0.0.0
  System.String To be added.

  Use the property to set the namespace of the wrapper element.

  Gets or sets the namespace of the message body wrapper element.