complex datatypes and methods

  • Thread starter Mario Rodriguez
  • Start date
M

Mario Rodriguez

Hi, I created a custom container class in order to return values from web
method calls and this works fine, but my problem is that I added some
methods to this custom container class and when I tried to invoke the
methods of the container from the client side it throws a compiler error:
"does not contain a definition of <myMethod>"

Any Idea ???
 
A

Andrew Hopper

Due to how the XML serializer works, the classes that the Web Services proxy
generator creates to represent server-side classes on the client side will
only contain public fields and read/write public properties - no methods or
read-only properties will be created on the client side. If you want to make
your methods accessible on the client side, you'll have to either manually
add them to the classes the proxy generator creates or use a shared types
library (see my blog entry on this topic for details:
http://dotnetified.com/CommentView.aspx?guid=abaf08b3-1abd-4dae-be05-23b733ff3c5d).

Hope this helps!
-Andy Hopper
http://www.dotnetified.com
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top