Pro WCF: Practical Microsoft SOA Implementation
by Chris Peiris, Dennis Mulder, Shawn Cicoria, Amit Bahree, Nishith Pathak
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access