Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling
Message
From
04/12/2003 11:53:18
 
 
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Miscellaneous
Thread ID:
00855920
Message ID:
00855948
Views:
16
Have a look at this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconHandlingRaisingExceptionsInXMLWebServices.asp

-Mike

>Is there a standard practice for returning error information to a consumer of a web service?
>
>A web method can return different data types, so it would seem that it would make sense for a web method to return a NULL value to indicate that an error occurred, allowing the client application to detect and handle the error. However, it would be nice if the client application had some way of retrieving some more meaningful and helpful error information from the web service. How is this normally handled? My first thought was to have a GetError() method of any web object class, so that if a method call returns a NULL value, a subsequent call to the GetError() method could allow the client application to determine what went wrong, and what information to give to the user.
>
>If this is a good approach, what is the preferred mechanism to preserve state between the return of the null "flag" and the subsequent call to the GetError() method?
>
>Thanks.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform