When I expose a WCF service using DataContact/DataMember attributes, each service reference I make in other projects to this service generates classes with DataContract/DataMember attributes (as well as IExtensibleDataObject interface implementation, etc.).
In another project, I have to use a SOAP service whose WSDL has not been generated by WCF, but by some other tool I don't know and can't change the behavior.
My problem is that the code generated by my svcutil proxy is a little bit less flexible:
- The classes use the Serializable attribute instead of DataContract (GeneratedCode attribute specifies the use of System.Xml instead of System.Runtime.Serialization)
- IExtensibleDataObject is not implemented
- OptionalField attributes are not used
- Order of XmlElement is fixed, which results in deserialization fails when a new xs:element is inserted in the middle of a wsdl xs:sequence...
What happened in the svcutil tool / the wsdl I use, that it has to generate code in this way?