1) Does Binding
use while creating ChannelFactory makes any difference to how serialization/deserialization works? (I know that binding used should match the server side binding of the service.)
I am using KnownType attribute in one of my DataContract
but it does not work. But if I use XmlIncludeAttribute, it works! (I am migrating my ASMX services to WCF.. But I am not using any MessageContracts since I have freedom to update client side proxies too.)
[XmlInclude(typeof(Males))] [DataContract] public abstract class Person { [DataMember] public int Name { get; set; } }
2) If I use any Attribute ( to be specific - XmlInclude)) that uses XmlSerializer
for the WCF DataContract
, does WCF use XmlSerializer
instead of DataContractSerializer
?