Skip to Content
Pro WCF: Practical Microsoft SOA Implementation
book

Pro WCF: Practical Microsoft SOA Implementation

by Chris Peiris, Dennis Mulder, Shawn Cicoria, Amit Bahree, Nishith Pathak
January 2011
Intermediate to advanced
507 pages
13h 27m
English
Apress
Content preview from Pro WCF: Practical Microsoft SOA Implementation

XML Serialization

As you have seen so far, the default option to serialize data types is the data contract serializer, which is implemented via the DataContractSerializer class. However, WCF also supports XmlSerializer. Although XmlSerializer supports fewer types compared to DataContractSerializer, it does provide better control over the resulting XML and also supports more of the XSD standard. Even though DataContractSerializer is the default option, sometimes using XmlSerializer is better:

  • It's better if you are migrating an application from ASP.NET web services to WCF and want to reuse existing types instead of data contracts.

  • It's better when more control over XML is required for it to adhere to some schema.

  • It's better when services need ...

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.
Start your free trial

You might also like

Pro WCF 4: Practical Microsoft SOA Implementation, Second Edition

Pro WCF 4: Practical Microsoft SOA Implementation, Second Edition

Nishith Pathak

Publisher Resources

ISBN: 9781590597026Purchase book