Message is the packet of data which contains important information. WCF uses these messages to transfer information from Source to destination.
Message contract can be applied to type using MessageContract attribute. Custom Header and Body can be included to message using 'MessageHeader' and 'MessageBodyMember'atttribute. Let us see the sample message contract as:
[MessageContract]
public class EmployeeDetails
{
[MessageHeader]
public string EmpID;
}
When using Message contract type as parameter, you can use only one parameter in service operation as:
[OperationContract]
void PeopleSoftSave(EmployeeDetails emp);