473,394 Members | 1,721 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,394 software developers and data experts.

Testing a WebService

Please help guys,

I wondering if there is a way to test a web service for availability. i.e a
simple test to see if the webservice is up and running or available before I
make the actual method call on the webservice...something like a ping in
networking
--
Faith as small as a mustard seed can move mountains...Jesus Christ
Nov 23 '05 #1
3 3911
Call a method and catch/test the System.Net.WebException. This being the
case, it does not make sense to perform this task twice, just be sure you
make all of your webmethod calls in a try/catch block.

Calling a webmethod to test for an error only to turn around and call it (or
another method) again to get results does not make sense.

You can pink the server (if it responds to pings) to see if the server is
up, but you are going to have to rely on status codes (errors) to see if the
actual web service is responding.

HTH,

John Scragg

"Chinedu" wrote:
Please help guys,

I wondering if there is a way to test a web service for availability. i.e a
simple test to see if the webservice is up and running or available before I
make the actual method call on the webservice...something like a ping in
networking
--
Faith as small as a mustard seed can move mountains...Jesus Christ

Nov 23 '05 #2
Hi,

what you could do is make a simple HttpRequest to the 'index page' of
the webservice. Catch the HTTP timeout or error code returned. This
will tell you if it's "up & running". There is ofcourse still a race
condition if anything happens to the server between you check and the
first WebService call... but you would know up front if its down.

Hope this helps,

Marvin Smit.
On Mon, 24 Oct 2005 09:29:04 -0700, "Chinedu"
<Ch*****@discussions.microsoft.com> wrote:
Please help guys,

I wondering if there is a way to test a web service for availability. i.e a
simple test to see if the webservice is up and running or available before I
make the actual method call on the webservice...something like a ping in
networking

Nov 23 '05 #3
you can type the URL of the webservice in IE

http://<yourserver>/webapp/webservice.asmx?wsdl (this will give you xml
display - which says your webservice is active )

http://<yourserver>/webapp/webservice.asmx (this will give you web based
form to invoke and check your webserives..)

"Chinedu" wrote:
Please help guys,

I wondering if there is a way to test a web service for availability. i.e a
simple test to see if the webservice is up and running or available before I
make the actual method call on the webservice...something like a ping in
networking
--
Faith as small as a mustard seed can move mountains...Jesus Christ

Nov 23 '05 #4

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

Similar topics

8
by: DraguVaso | last post by:
Hi, I'm new to WebServices, and I'm doing some tests (with a small VB.NET-application) to know the performance-difference between a WebService and the 'normal'-way of getting data (just...
0
by: sandman | last post by:
I've got an application that a couple of users want to start testing. But the database is still running off the localhost on my development system. I planned on writing a webservice to handle the...
0
by: Mensand DotNet | last post by:
Hi, I've written a webservice. The testingpage is real cool but it doesn;t allow me to test it on a different machine. It says something like only on local machine. How can i set it to also...
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
3
by: Rich Denis | last post by:
Hello, I am in need of assistance trying to figure out how to 'Unit Test' my Event Based Async Pattern (http://msdn2.microsoft.com/e7a34yad.aspx) web service calls. Specifically how to test the...
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
3
by: TompIfe | last post by:
Hei, I have a web service with web methods that take nullable DateTime parameters (i.e., DateTime?) When i open the service in IE7, I get the message that those methods cannot be viewed ("not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.