HighTechTalks DotNet Forums  

Beginner question: objects

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Beginner question: objects in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jeff Johnson
 
Posts: n/a

Default Beginner question: objects - 06-19-2006 , 09:04 AM






I would like to pass a generic System.Object to a web method. The actual
object will be of a derived class and will not always be the same class.
However, in my initial attempt I got errors saying "<specifc object type>
not expected." Are Web services unable to "ignore" the object type when
passing things around? If so, I may need to resort to Remoting instead
(assuming THAT will work).



Reply With Quote
  #2  
Old   
Jeff Johnson
 
Posts: n/a

Default Re: Beginner question: objects - 06-19-2006 , 03:58 PM






"Jeff Johnson" <i.get (AT) enough (DOT) spam> wrote


Quote:
I would like to pass a generic System.Object to a web method. The actual
object will be of a derived class and will not always be the same class.
However, in my initial attempt I got errors saying "<specifc object type
not expected." Are Web services unable to "ignore" the object type when
passing things around? If so, I may need to resort to Remoting instead
(assuming THAT will work).
Hmmm, it appears like I may be out of luck, because apparently at some point
in the serialization process the program (Web service or Remoting server)
needs to know about the concrete class that the object is based on and that
just isn't an option in my case. I've gone a different route, which is to
have the client serialize the object itself (I was hoping to avoid this) and
then simply pass the Web service a byte array. It's too bad there isn't an
Object.ToByteArray() method....




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.