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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.