How to copy data from CLR object to its proxy?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Max Christian (news_at_maxuk.net)
Date: 06/01/04


Date: 31 May 2004 23:15:41 -0700

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]



Relevant Pages

  • Re: link problem in a C++ web service client
    ... > Java web services and need to test them with C++ clients. ... I'm having problems with the C++ client. ... > reference to the service WSDL and named the reference donow11service, ... > Creating web service proxy file for donow11service ... ...
    (microsoft.public.dotnet.languages.vc)
  • Re: WSDL Generated Proxy Classes?
    ... WSDL file is that each client can download the WSDL file and generate ... In other words, the logic that a proxy class encapsulates, the same ... I think that you're missing the point that web services are not tied to a technology or an environment, and that the proxy classes can be generated dynamically during runtime. ... Both Web Services & business objects require compiled objects that are ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SOAP header
    ... when design the old version web services, ... header from client request, and let client to set the SOAP header ... since client is using old proxy which does not ...
    (microsoft.public.vc.language)
  • Re: How to copy data from CLR object to its proxy?
    ... proxy classes on your client side. ... Service orientation is all about sharing schema's instead of ... > ever needing to take the values from a CLR object? ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WCF Proxies
    ... It's not so much that ASMX web services aren't meeting your needs, ... Essentially, you've got a network composed of A, B, and C - and a client ... So the client generates a proxy for the WSDL. ... with additional servers to be added later. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)