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 ?