Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SoapFormatter throws System.Exception when deserializing non-compatible versions

Reply
Thread Tools

SoapFormatter throws System.Exception when deserializing non-compatible versions

 
 
Chris Newby
Guest
Posts: n/a
 
      05-16-2005
Given:

public class MyClass{
public String MyPropertyOne;
}

I have a soap document created by serializing an instance of a previous
version of MyClass. However, now MyClass looks like:

public class MyClass{
public String MyPropertyOne;
public String MyPropertyTwo;
}

If I now use the SoapFormatter to deserialize the older instance of MyClass,
I get an exception that looks like:

"Wrong number of Members. Object MyClass has 2 members, number of members
deserialized is 1"

I would like the older instance to continue deserializing, even though it
might not be "binary compatible". Is there an easy way to do this?

TIA//




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SoapFormatter in Java zabutimaxim@gmail.com Java 0 12-30-2007 12:18 PM
SoapFormatter only works in Full Trust? =?Utf-8?B?TWFydHluIEZld3RyZWxs?= ASP .Net 5 05-14-2007 03:15 AM
SoapFormatter In WebService Ram ASP .Net Web Services 0 03-02-2006 06:56 PM
"Stream was not readable" error when deserializing object from viewstate ce ASP .Net 2 05-15-2005 03:29 AM
Re: Deserializing custom ArrayList type from ViewState... help.. PJ ASP .Net 1 06-25-2003 02:39 PM



Advertisments