Use WebClient to call web service method

  • Thread starter Thread starter haydn.chapman
  • Start date Start date
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.
 
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,
 
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
 
Back
Top