开发者

XML Serialization and Soap Serialization

开发者 https://www.devze.com 2022-12-26 05:41 出处:网络
I think even if 开发者_开发知识库we will not need interoperability between applications, and even we do not communicate with web services, it is easier to serialize using SoapFormatter than XmlSeriali

I think even if 开发者_开发知识库we will not need interoperability between applications, and even we do not communicate with web services, it is easier to serialize using SoapFormatter than XmlSerializer because SOAP will serialize the private members by default, while XmlSerializer will work on public properties and fields. actually I cannot find a reason for using XmlSerializer, do I miss something? what is disadvantages of SoapFormatter. or what is advantage of XML serialization over Soap? (xsd)

thanks


A major disadvantage is that the SoapFormatter class is deprecated. You may take a look at the DataContractSerializer instead.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消