0

Please help me..I wanna serialize/deserialize an object on WP7 on visual studio 2010 with c#. Why I can not use soapformatter? How can I do soap serialization/deserialization on wp7?

user1285383
  • 73
  • 2
  • 2
  • 4
  • XML+SOAP as a transport format isn't really suitable for mobile devices. It could work in theory, but such devices typically have low bandwidth and (relatively) low processing power and SOAP is just too verbose and too complicated to be practical for mobile use (or any use). For smartphones, the transport format of choice is JSON and if I had to invoke a SOAP service from a mobile device I'd proxy that service on my server and do a SOAP-to-JSON translation on the server side. – Barend Mar 22 '12 at 10:01

1 Answers1

0

Is there a reason you need to use the Soap serializer?

If not (if you just need to do serialization to file for example), you can just use the XmlSerializer (which is very close to the Soap one iirc) and the DataContract one. My recommendation is to use the DataContract one with an empty namespace.

XmlSerializer: http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer(v=vs.95).aspx

DataContract: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer(v=vs.95).aspx

Shahar Prish
  • 4,838
  • 3
  • 26
  • 47