Introducing Message Contracts

When using data contracts, usually your concentration is on the data structure and the serialization aspects of those structures and not so much on the SOAP message, which carries the "payload" between the service and the consumer. In other words, the data contracts control the format of the SOAP message. However, if you are in a situation where you want an equal amount of control over both the structure and the content of the message because of operational reasons, then you need to use message contracts as opposed to data contracts. When using message contracts, you can use a data type as either the parameter to a service call or the return value from a call. And it is this data type that is precisely serialized ...

Get Pro WCF: Practical Microsoft SOA Implementation now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.