WCF and xs:choice

I'm currently working with an XSD that has elements defined with xs:choice (that wasn't my choice; the XSD came from another group and we have to use it). Unfortunately, WCF...actually, to be more specific, svcutil.exe doesn't like that at all. The error message said this:

If you are using the /dataContractOnly option to import data contract types and are getting this error message, consider using xsd.exe instead. Types generated by xsd.exe may be used in the Windows Communication Foundation after applying the XmlSerializerFormatAttribute attribute on your service contract. Alternatively, consider using the /importXmlTypes option to import these types as XML types to use with DataContractFormatAttribute attribute on your service contract.

So I'm going down the road with xsd.exe and seeing if I can get my WCF service to play nice with this type.

Gotta love interoperability!

* Posted at 05.15.2007 10:26:45 AM CST | Link *

Blog History