How to pass an object as parameter ?

C

chak

I have a class with public properties defined in an assembly. I then have a
web service in
the same solution, which takes an object of this class as a parameter.
However, the web service works only if i key in the the fully qualified
name of the object (including namespace) in the proxy class. How can this
be avoided ?
 
D

Dan Rogers

Hi,

If it is your intent to have the same implementation shared by the client
and the server, then you will need to modify the proxy class that is
generated to use the namespace you desire - and you will also have to add
that DLL as a reference to the client-side project.

The generated proxy has a "data compabible" implementation of the classes
that the service requests as inputs and return types. You'll probably want
to comment these out if you change the generated proxy.

Alternately, you could make the generated proxy have the same namespace as
your server side data DLL. This way, you won't have to change any of the
generated code.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
 
C

chak

Thanks. I have changed the proxy namespace to be the same as that of the
custom class and so far things seem to work.
 

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

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top