I am adding a WCF Service Reference in a Silverlight project, it is generating code with XmlSerialization attributes for DataMembers than SOAP Serialization. But, if the same WCF service reference is added in an ASP.Net project, is generating code with SOAP Serialization attribtues. Can anybody let me know what could be the cause for it, and how can I force reference to generate SOAP Serialization?
XmlSerialization – [System.CodeDom.Compiler.GeneratedCodeAttribute(“System.Xml”, “4.0.30319.1”)] SOAP Serialization – [System.CodeDom.Compiler.GeneratedCodeAttribute(“System.Runtime.Serialization”, “4.0.0.0”)] These are the attributes in the code generated for types, which I am looking into when saying it is using XmlSerialization/SOAP Serialization
I am adding a WCF Service Reference in a Silverlight project, it is generating
Share
Found out the reason for the behavior.
One of the methods in the WCF Services is returning DataSet as the result. Since Silverlight does not support direct ADO.Net object, the proxy generator tool for Silverlight is forcing it to generate XmlSerialization attributes than SOAP Serialization attribute.