views:

199

answers:

2

Hi

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

+1  A: 

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

Darin Dimitrov
we are on .NET 2.0 so that's a bit of a problem
Gordon Carpenter-Thompson
A: 

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.

Arrabi