Use WebClient to call web service method

H

haydn.chapman

Hi,

I have a simple web service that has a method

public string Query(string message)

that at the moment just takes a message and returns it. Is it possible
to call this method using the System.Net.WebClient class.

I am currently using a web reference of the service in my project and
creating an instance of it, then calling the method.

Cheers.
 
J

Joerg Jooss

Thus wrote (e-mail address removed),
Hi,

I have a simple web service that has a method

public string Query(string message)

that at the moment just takes a message and returns it. Is it possible
to call this method using the System.Net.WebClient class.

Yes, it's possible, but it may require a lot of manual labor that Web References
nicely take care of.

Cheers,
 
H

haydn.chapman

Thanks for replying Joerg,
I've been ou tof the office so it's taken a while to respond.
If like you say it's quite a lot of effort and web references work just
as well i will probably just use those.

Thanks again,
H
 

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