473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Use WebClient to call web service method

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.

Feb 24 '06 #1
2 6531
Thus wrote ha***********@gmail.com,
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,
--
Joerg Jooss
ne********@joergjooss.de
Feb 24 '06 #2
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

Mar 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason | last post by:
Hi I have a Windows service running. I have instantiated a WebClient object and try to call the function DownloadFile(). but while the service is running i get a "The underlying connection was...
3
by: Michael Fields | last post by:
I have a problem with the WebClient and uploading a file to a web server. The stream object returned from the WebClient.OpenWrite menthod throws a timeout exception when using this method on...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
3
by: Manuel | last post by:
I have an asp page ("test.asp") that presents the data it receives from a post.When I try the following code, test.asp doesn't return the values (supposedly) posted to it. If I make a web page with...
7
by: Crirus | last post by:
Hi all! I use a webClient for requesting data from a server of mine. Should I worry about long ammount of data sent by server in the client side? Or, another way, should I send some kind of a...
6
by: Giovanni | last post by:
Hi Guys, Really strange problem I am experiencing... I have setup a virtual directory with Read Only permissions on an ISA/IIS server (SBS 2003). In that virt. dir., I placed 1 file...
2
by: Daniel | last post by:
As you may have guessed I'm trying to upload a file to a php server using the WebClient.UploadFile function, however the function never returns. Instead it chews up memory (fairly slowly) until it...
3
by: =?Utf-8?B?dmFzaW1v?= | last post by:
Have the following code: wkLocalPath = "C:\A\1.jpg" wkServerPath = "http://servername/dirname/1.jpg" wcClient.Credentials = New NetworkCredential("UID", "PW") wcClient.UploadFile(wkServerPath,...
1
by: jmk | last post by:
I'm trying to use an external SMS-service through .NET Framework 1.1 and using the webClient.DownloadData(strMessage) method. The strMessage is a string consisting the parameters to send a message,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.