Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catch Soap exception

Status
Not open for further replies.

Jouster

Programmer
Dec 4, 2000
82
0
0
US
Hello,

I have written a small web service and a client to consume it.
I am intentionally throwing a soap exception so i can see if it is working. In my client application it sees it as an exception and not a soap exception.Here is the code for the client program.


Imports System.Web.Services.Protocols

Imports System.Web.Services.Protocols.SoapException
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim emp As New ricks.Employee

Dim binding As New ricks.StructService1SoapClient

Try
emp = binding.GetEmployee()
Catch ex As SoapException
MessageBox.Show(ex.Message)
MessageBox.Show(ex.Code.ToString)
Catch et As Exception
MessageBox.Show(et.Message)
End Try

txtName.Text = emp.Name
txtAge.Text = emp.age
txtSSN.Text = emp.SSN
txtHDate.Text = emp.HDate.ToString()

End Sub
End Class

Thanks for any help,
Rick
 
then it's not a soap exception from .net point of view. dump the entire exception (not just the message) and review the details: type of exception, message, stack trace, etc.
Code:
MessageBox.Show(ex.ToString);

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top