473,246 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

SoapFormatter to XmlSerializer conversion

We currently persist our objects to xml/soap files using a SoapFormatter.
We control the serialization and de-serialization by implementing the
ISerializable and its two interface methods, namely, GetObjectData and a
constructor that takes two arguments (a SerializationInfo object and a
StreamingContext object).

It appears with the release of .net 2.0 that support for the SoapFormatter
is 'frozen' and that the direction we should take is to convert over to
using XmlSerializer. But it doesn't seem that the XmlSerializer has a
similar mechanism for controlling the serialization process. Instead, it
seems that attributes must now be placed on properties and fields to control
the serialization process. Given the large number of different object types
we persist, this will be a daunting task. And I haven't found any
documentation about some migration path.

Any direction or help on how to get from SoapFormatter to XmlSerializer
would really help.

Paul

Nov 12 '05 #1
2 2141
Hi Paul,

It seems the usage of SoaFormatter and ISerialize is the same as in .NET
1.1. However, the SoapFormatter does not support serialization
compatibility between versions of the .NET Framework. Serialization between
versions 1.1 and 2.0 types in the Framework often fails. You can check the
following links for more informatioin.

http://msdn2.microsoft.com/en-us/lib...us,VS.80).aspx

http://msdn2.microsoft.com/en-us/lib...ization.iseria
lizable

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #2
Don't know if this will help, but XmlSerialization (via the XmlSerializer)
has a similar mechanism to control serialization that .NET Serialization
does. There is an interface called IXmlSerializable. It's undocumented in
..NET 1.0 & 1.1 but exposed in .NET 2.0. You can search the web and find
articles on how to implement IXmlSerializable to control the serialization.
--
Thanks,
Nick
"Paul" wrote:
We currently persist our objects to xml/soap files using a SoapFormatter.
We control the serialization and de-serialization by implementing the
ISerializable and its two interface methods, namely, GetObjectData and a
constructor that takes two arguments (a SerializationInfo object and a
StreamingContext object).

It appears with the release of .net 2.0 that support for the SoapFormatter
is 'frozen' and that the direction we should take is to convert over to
using XmlSerializer. But it doesn't seem that the XmlSerializer has a
similar mechanism for controlling the serialization process. Instead, it
seems that attributes must now be placed on properties and fields to control
the serialization process. Given the large number of different object types
we persist, this will be a daunting task. And I haven't found any
documentation about some migration path.

Any direction or help on how to get from SoapFormatter to XmlSerializer
would really help.

Paul

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Willock | last post by:
Hi, I have a class derived from ApplicationException as below (excuse formatting): public class MyException : ApplicationException { public string CompanyName { get {return...
2
by: Wiktor Zychla | last post by:
After signing all my assemblies with strong keys, I've found that the application refuses to deserialize any SOAP serialized data. The message says: Parse error, no assembly associated with the...
2
by: Jarda | last post by:
Hi all, i'm looking for some performance comparison some charts. I have read the xmlserializer is better, more flexible and faster (analyzing data types in constructor), but there are some...
0
by: cmrchs | last post by:
Hi, XmlSerializer can serialize data to a file, but SoapFormatter can do the same except that the serialized data in the file is not proper Xml : for instance there is no XmlRoot-element. Why...
1
by: Jim S | last post by:
I have an application where I have to make a tree of objects. To do this, I have my own node class. At certain points in the application, I need to save data. I am having a problem with the...
2
by: Phillip Galey | last post by:
I have an object called Place which contains only string properties and has the <Serializable()> flag before the class name declaration. I also have a collection object called Places, which is...
0
by: JackRazz | last post by:
I'm trying to serialize a collection to a file stream by serializing each object individually. The code below works fine with the BinaryFormatter, but the SoapFormatter reads the first object and...
5
by: =?Utf-8?B?TWFydHluIEZld3RyZWxs?= | last post by:
Hi there. I posted an earlier issue under the name "That assembly does not allow partially trusted callers" but have now identified what the issue is. As explained before I am working in...
0
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
Hello. I have found out that a VS2005 WebService by default serializes my objects using normal XmlSerializer. Howerver, I need it to serialize them using SoapFormatter by default (without doing the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.