Use the MessageContractAttribute 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 System.Runtime.Serialization..::.DataContractAttribute, Specifying Data Transfer in Service Contracts, and Data Contracts Overview.
To implement a message contract for a type, annotate it with MessageContractAttribute and annotate one or more of the class's fields or properties with MessageBodyMemberAttribute, MessageHeaderAttribute, or MessageHeaderArrayAttribute.
Use the Action and ReplyAction properties to specify the value of the <Action> element in the SOAP message.
Use the HasProtectionLevel and ProtectionLevel properties to indicate whether the SOAP message type has a protection level, and if so, what it is.
Use the IsWrapped property to indicate whether the message body has a wrapper element, and if so, use the WrapperName and WrapperNamespace properties to specify the name and namespace, respectively, of the wrapping element.
For more information, see Using Message Contracts.