An open plea to Microsoft to fix the serializers in WCF.
Posted
by Scott Wojan
on Geeks with Blogs
See other posts from Geeks with Blogs
or by Scott Wojan
Published on Fri, 10 Dec 2010 18:40:12 GMT
Indexed on
2010/12/10
22:18 UTC
Read the original article
Hit count: 281
I simply DO NOT understand how Microsoft can be this far along with a tool like WCF and it STILL tout it as being an "Enterprise" tool.
For example... The following is a simple xsd schema with a VERY simple data contract that any enterprise would expect an "enterprise system" to be able to handle:
An minimal example xml document would be:
With the max example being:
This schema simply CANNOT be exposed by WCF.
Let's list why:
- svcutil.exe will not generate classes for you because it can't read an xsd with xs:annotation.
- Even if you remove the documentation, the DataContractSerializer DOES NOT support attributes so IPAddress would become an element this not meeting the contract
- xsd.exe could generate classes but it is a very legacy tool, generates legacy code, and you still suffer from the following issues:
- NONE of the serializers support emitting of the xs:annotation documentation. You'd think a consumer would really like to have as much documentation as possible!
- NONE of the serializers support the enforcement of xs:restriction so you can forget about the xs:minLength, xs:maxLength, or xs:pattern enforcement.
Microsoft... please, please, please, please look at putting the work into your serializers so that they support the very basics of designing enterprise data contracts!!
© Geeks with Blogs or respective owner