473,396 Members | 1,683 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.

If Web Service Exist?

Hi,

Im writing a small application that checks whether a Web Service in is
available or not using VB.Net. Just need to decide whether to call a
secondary source or whatever. Can anyone help me with this or even
point me in the right direction.

Thanks in advance.

Joel

Apr 13 '07 #1
4 1179
try calling the WebService from inside a Try Catch End Try block
eg
Try
Dim SomeObject = new WebServiceName()
Catch ex as SoapException
Console.WriteLine(ex.Message) 'Just in Case
'webservice not up
End Try

Does this answer your question?

On Apr 13, 4:01 am, joel_di...@yahoo.com wrote:
Hi,

Im writing a small application that checks whether a Web Service in is
available or not using VB.Net. Just need to decide whether to call a
secondary source or whatever. Can anyone help me with this or even
point me in the right direction.

Thanks in advance.

Joel

Apr 13 '07 #2
On Apr 13, 9:36 pm, "Karim" <jimmy00...@gmail.comwrote:
try calling the WebService from inside a Try Catch End Try block
eg
Try
Dim SomeObject = new WebServiceName()
Catch ex as SoapException
Console.WriteLine(ex.Message) 'Just in Case
'webservice not up
End Try

Does this answer your question?

On Apr 13, 4:01 am, joel_di...@yahoo.com wrote:
Hi,
Im writing a small application that checks whether a Web Service in is
available or not using VB.Net. Just need to decide whether to call a
secondary source or whatever. Can anyone help me with this or even
point me in the right direction.
Thanks in advance.
Joel- Hide quoted text -

- Show quoted text -
Hi Karim,

so sorry coz im still new with Web Service in VB.Net but here's what I
did so far...

1. I added a Web References -MyWebService
2. Reference -http://localhost/ACMEWS.asmx
3. In Form Class...

Public Class Form1
Inherits Windows.Forms.Form
Private service As MyWebService.ACMEWS

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

service = New MyWebService.ACMEWS()

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

End Sub

End Class

if button1 is clicked and web service is down it should notify me that
its down so i can decide which action to take.

are you saying to wrap this...

service = New MyWebService.ACMEWS()

with Try...Catch...End Try ?


Apr 13 '07 #3
are you saying to wrap this...
>
service = New MyWebService.ACMEWS()

with Try...Catch...End Try ?
Yes.

Thanks,

Seth Rowe
On Apr 13, 10:11 am, joel_di...@yahoo.com wrote:
On Apr 13, 9:36 pm, "Karim" <jimmy00...@gmail.comwrote:
try calling the WebService from inside a Try Catch End Try block
eg
Try
Dim SomeObject = new WebServiceName()
Catch ex as SoapException
Console.WriteLine(ex.Message) 'Just in Case
'webservice not up
End Try
Does this answer your question?
On Apr 13, 4:01 am, joel_di...@yahoo.com wrote:
Hi,
Im writing a small application that checks whether a Web Service in is
available or not using VB.Net. Just need to decide whether to call a
secondary source or whatever. Can anyone help me with this or even
point me in the right direction.
Thanks in advance.
Joel- Hide quoted text -
- Show quoted text -

Hi Karim,

so sorry coz im still new with Web Service in VB.Net but here's what I
did so far...

1. I added a Web References -MyWebService
2. Reference ->http://localhost/ACMEWS.asmx
3. In Form Class...

Public Class Form1
Inherits Windows.Forms.Form
Private service As MyWebService.ACMEWS

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

service = New MyWebService.ACMEWS()

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

End Sub

End Class

if button1 is clicked and web service is down it should notify me that
its down so i can decide which action to take.

are you saying to wrap this...

service = New MyWebService.ACMEWS()

with Try...Catch...End Try ?

Apr 13 '07 #4
On Apr 13, 9:36 pm, "Karim" <jimmy00...@gmail.comwrote:
try calling the WebService from inside a Try Catch End Try block
eg
Try
Dim SomeObject = new WebServiceName()
Catch ex as SoapException
Console.WriteLine(ex.Message) 'Just in Case
'webservice not up
End Try

Does this answer your question?

On Apr 13, 4:01 am, joel_di...@yahoo.com wrote:
Hi,
Im writing a small application that checks whether a Web Service in is
available or not using VB.Net. Just need to decide whether to call a
secondary source or whatever. Can anyone help me with this or even
point me in the right direction.
Thanks in advance.
Joel- Hide quoted text -

- Show quoted text -
Hi Karim/Rowe,

Thanks, it works.

Many thanks.

Joel

Apr 16 '07 #5

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

Similar topics

4
by: Daylor | last post by:
i have 1 main winapplication. 3 services ,each in dll. each service is created for telephony user. each service is destroyed when the telephony user is hangUp. is there a way to recompile...
1
by: charismatic_evangelist | last post by:
I am trying to write a Windows Service in C# .NET Version 1.1. I followed Microsoft's directions: ...
5
by: Jacobus Terhorst | last post by:
I created a simple windows service. However when I built it again a couple of days later I could no longer install the service. The InstallUtil.exe cannot UNINSTALL the service because "The...
3
by: trialproduct2004 | last post by:
hi all i have one problem in windows service. i have code as following:- DirectoryInfo di = new DirectoryInfo(szfolder); if(di.Exists==true) eventLog1.WriteEntry("exist"); else
7
by: Larry Bird | last post by:
I have a windows service that want to un-install. When I run "installutil /u serivcename" I get the error that the serivce is not installed on my machine. However, when view the serivce console I...
0
by: Charles Leonard | last post by:
I need opinions regarding Web Service Namespace usage and/or suggestions regarding how to handle deployment. Our web service application will exist in two different domains and is likely to...
3
by: Ahmad Jalil Qarshi | last post by:
Hi! I am developing an application in C# as a windows NT Service. This application needs to check for eventlog using EventLog.Exists("System") But unfortunately it generates exception...
0
by: Waldy | last post by:
Hi there, I have written a C# service that self installs by running the ..exe with a parameter. A log is produced when it does this. At a customer site where they have had to re-install, they...
20
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1...
1
by: Puja Patel | last post by:
hi all, am not sure if this is the right place for this post. I created a website on .net framework 2.0 using visual studio 2005 and web service software factory. I created all my business...
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:
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.