[2005] Throw Exception From Web Service
Hello,
I have a problem in as much as my message that is being thrown from my class, to my webservice, to my application isn't showing in the friendly format - it is showing a large box with things like system.web.services.protocols.soapexception.......
It does contain the text of my error, but I need it to look nice to the users.
My code is as follows :
Class
Code:
Try
IF
Do stuff...
Else
Throw New System.Exception("An Employee with this Reference already exists!")
End If
Catch ex As Exception
Throw ex
End Try
WebService
Code:
Try
Call Class.....
Catch ex As Exception
Throw ex
End Try
Application
Code:
Try
Do Stuff......
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Can anyone help please ?
Re: [2005] Throw Exception From Web Service
Can you please post the exact error message? I think that the problem maybe that you are not passing the correct SOAP message to or from the web service. Either types or names are different.
1 Attachment(s)
Re: [2005] Throw Exception From Web Service
Sure - the message is attached:
I've tried putting a watch on "ex" and in the class it simply shows as "An Employee with this Reference already exists!"
In the Webservice is simply shows as "An Employee with this Reference already exists!"
But on my application's form it shows as per the screenshot and I've no idea why.
Re: [2005] Throw Exception From Web Service
Hi vbud,
I've had a look for details relating to passing SOAP Messages, but haven't really found anything useful.