(Max Christian)
7/22/2004 12:11:00 AM
On the client, I have a type myAssembly.myClass from the same assembly
the server uses, and its proxy, localhost.myClass, generated via the
Web Reference.
I can call Web Methods passing objects of type localhost.myClass
without any trouble. But what I need to be able to do is pass (the
data from) myAssembly.myClass objects on the client.
It isn't possible to cast from myAssembly.myClass to localhost.myClass
using CType. I could write code manually to copy data memberwise from
a myAssembly.myClass object to a localhost.myClass object, but the
class is huge and so it would create terrible maintenance problems.
I can't quite understand why there aren't hundreds of people out there
with this problem -- I must be missing something obvious. Do people
really fill in the fields of object parameters to web services without
ever needing to take the values from a CLR object?
Anyway, is there any sensible way to copy the data from a CLR object
to its Web Service proxy?
Thank you very much for any help,
Max Christian
[replace NEWS with my first name in email address to respond]