Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Serializing classes from Web Services

Thread Tools

Serializing classes from Web Services

Posts: n/a
I have a situation where I need to serialize a few classes (that are
read from a C++ web service) to ViewState or to Session. When I try
to do this I get an error that the class is not Serializable. Clearly
it is, because it has to be serialized to XML in order to be passed
from the Web Service. But it seems that the ViewState serialization
is a different animal.

I've solved the problem in the past by creating a new class in the
aspnet web client (C#) that duplicates the class but is tagged as
[Serializable]. Then I have to have code to transfer the data from
the input class to the serializable one before I can save it.

This is a horrible waste of code, processing power, Client and user
memory, and programing time! Isn't there a better way to do this?

Thanks, Russ
Reply With Quote
Peter Morris
Posts: n/a
The webservice serializer doesn't depend on the [Serliaziable] attribute
because it uses a different routine to perform the serialization.

Audio compression components, DIB graphics controls, FastStrings

Read or write articles on just about anything

Reply With Quote

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
De-serializing an object with missing child classes Java 10 09-07-2011 02:17 PM
How .NET web services client handles exceptions from Java web services? John ASP .Net Web Services 4 03-31-2006 10:13 PM
Serializing inner classes? Jonathan Bartlett Java 1 08-20-2005 06:28 PM
Serializing Object Properties: Web Controls vs. Components John Saunders ASP .Net Building Controls 0 09-16-2004 08:57 PM
Serializing classes derived from dataset Aidan Glendye ASP .Net 1 07-28-2003 02:29 PM