XML Serialization and Soap Serialization

I think that even if we don't need interoperability between applications, and even we don't communicate with web services, it is easier to serialize with SoapFormatter than XmlSerializer, because SOAP will serialize private members by default and XmlSerializer will work on public properties and fields. actually i cant find a reason for using the XmlSerializer, can i miss something? which is the disadvantage of SoapFormatter. or what are the advantages of XML serialization over soap? (xsd)

thank

+2


source to share


2 answers


The main disadvantage is that the SoapFormatter class is deprecated . You can take a look at DataContractSerializer instead .



+2


source


I had to use XmlSerializer because in my code I had to write Soap and mix it with HttpWebRequest instead of web service, so it was easier to deal with XmlSerializer.



0


source







All Articles