Hi,
Consider a class that I need to serialize and send over the wire. On
the receiving end, the serialization bytes have to be re-constructed to
form the object. The mentioned class has got some member variables and
one or more constructors.
[WebMethod()]
public void Test(MyClass c) {}
The question is that is there anyway to control the proxy-generation
for the MyClass class? i.e, how am I supposed to force the
proxy-generator to generate the constuctors? Or should I add the
required constructors on the client side using the partial keyword?
What's the best thing to do when you want to pass a one-way informative
parameter (ie., no functionality embedded except for the constructors)
to a web method?
I would like the client side to create the object normally as follows:
MyWebService.MyClass c = new MyWebService.MyClass(param1, param2);
MyWebService.Test(c);
Is there anyway to achieve such functionality?
TIA,
Mehdi
Lee Franke - 01 Sep 2006 19:02 GMT
I've tried to do what you are doing and it does not seem to work.
The best you can hope for is
MyWebService.MyClass c = new MyWebService.MyClass();
c.param1 = param1;
c.param2 = param2;
MyWebService.Test(c);
> Hi,
> Consider a class that I need to serialize and send over the wire. On
[quoted text clipped - 22 lines]
> TIA,
> Mehdi