I’ve been struggling the past day trying to find a way to generate a WCF Service that actually maintains the restrictions that are defined in the originating XSDs. The basic problem is that if I build a contract first service using an XSD that includes restrictions (for example patterns) the restrictions are removed from the WSDL/XSDs that are output when deploying the service.
Here is someone else complaining about the same problem: http://geekswithblogs.net/wojan/archive/2010/12/10/143086.aspx
I’m left with what I think are 2 options:
- Can I replace the service generated WSDL/XSD on the web server (IIS or IIS Express)
- Can I replace the default XML Serializer with another 3rd party serializer that does properly support XSD restrictions.
Thoughts?