Serializing classes from Web Services

Discussion in 'ASP .Net' started by Russ, Aug 10, 2004.

  1. Russ

    Russ Guest

    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
    Russ, Aug 10, 2004
    #1
    1. Advertising

  2. Russ

    Peter Morris Guest

    The webservice serializer doesn't depend on the [Serliaziable] attribute
    because it uses a different routine to perform the serialization.


    --
    Pete
    ====
    Audio compression components, DIB graphics controls, FastStrings
    http://www.droopyeyes.com

    Read or write articles on just about anything
    http://www.HowToDoThings.com
    Peter Morris, Aug 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aidan Glendye

    Serializing classes derived from dataset

    Aidan Glendye, Jul 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    498
    Aidan Glendye
    Jul 28, 2003
  2. Nick
    Replies:
    1
    Views:
    6,120
    Alvin Bruney - ASP.NET MVP
    Sep 12, 2005
  3. Jonathan Bartlett

    Serializing inner classes?

    Jonathan Bartlett, Aug 20, 2005, in forum: Java
    Replies:
    1
    Views:
    4,284
    Andrew McDonagh
    Aug 20, 2005
  4. Replies:
    10
    Views:
    419
  5. John
    Replies:
    4
    Views:
    441
Loading...

Share This Page