Object WebServices

J

jjm

Hi,

How can i transfer an object to a webservice.

I have a class with attributes in the asp.net

And a class in the webservice.
The user enters data from a asp.net webform.

I insert the objects into the object.
And call the method which accepts object as parameter.

The gets and sets and data types are identical in both objects in
webservice and asp.net.

The error is:

cannot convert from Member to localhost.Member.

Thanks in advance
 
G

Galcho[MCSD.NET]

as far as I understood you created TWO declarations for your object,
right?
for .NET they are TWO different types and it doesn't matter that they
have same name and members.

you must have one declaration(in WebService) and just reffer it in (web
app)

hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com
 
G

Guest

jjm,
Your class needs to be included in the WebService project, and marked as
Serializable.

When you get the WSDL contract from the service for your app to build it's
proxy class to talk to the webservice, a proxy version of your class will be
included in it.
That is the one you need to use.
Peter
 

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

Top