473,386 Members | 2,129 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,386 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 2148
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.