Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SOAPException message
Message
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00910888
Message ID:
00910894
Views:
63
As far as I know, the solution is not easy. Jan Tielens has an article about this that looks promising: http://www.microsoft.com/belux/nl/msdn/community/columns/jtielens/soapexceptions.mspx

http://hcorrea.no-ip.com/dotwiki/Default.aspx?topic=WebServiceTips


>Hello,
>
>I am calling some webservices and at some point in time, one of my WebService throws an exception (ApplicationException) with a specific message. I want to display the exception message in a DIV.
>
>The exception handler catches the exception but the string in the Message property of my exception contains too much information. It contains
>"System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ApplicationException: Missing mandatory field(s). " and all the Stack Trace...
>
>Here's the code (pretty straightforward) :
>Dim objWS As MyWebService
>
>Try
>
> objWS = New MyWebService
> objWS.MyWebMethod()
>
>Catch ex As Exception
> divErrors.InnerText = ex.Message
>End Try
>
>I would like to display only my message "Missing mandatory field(s)"... Of course I could parse the string and look for "--->" but I guess there's a better solution out there.
>
>Thank you for your help,
> Alex
Hector Correa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform