Thanks for your followup Chen,
yes, for ASP.NET Webservice, it has limited exception framework, the
serverside webservice can only propagate SoapException as the exception
object to clientside.... And our serverside custom exception detailes can
be encapsulated in the SoapException's properties.... (xmlNode....). The
msdn .NET exception management guide also mentioned this:
#Exception Management Architecture Guide
http://msdn.microsoft.com/library/en-us/dnbda/html/exceptdotnet.asp?frame=tr
ue
And here is a certain tech article discussing on encapsulating custom
exception info through SoapException and the xml data:
#Exception Handling in Web Services
http://www.developer.com/net/csharp/article.php/10918_3088231_1
Hope helps. Thanks,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "chen" <venkatar@sig.com>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
[quoted text clipped - 11 lines]
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1135794066 4792 127.0.0.1 (28 Dec 2005
18:21:06 GMT)
| X-Complaints-To: groups-abuse@google.com
| NNTP-Posting-Date: Wed, 28 Dec 2005 18:21:06 +0000 (UTC)
| User-Agent: G2/0.2
| X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
| Complaints-To: groups-abuse@google.com
| Injection-Info: f14g2000cwb.googlegroups.com; posting-host=141.162.101.50;
| posting-account=X7ANQg0AAAB-ENGC8U9YFBV5V2pedTsn
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.gigan
ews.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:31228
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
|
[quoted text clipped - 16 lines]
| client side. So does it add any value in specifying them in the .wsdl
| at all? What are some of the best practices in this area?
Steven Cheng[MSFT] - 03 Jan 2006 11:36 GMT
Hi Chen,
Does the things in my latest reply helps? If still anything else we can
help, please feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 107681489
| References: <1135106866.671728.7250@g14g2000cwa.googlegroups.com>
<1135794060.895244.127730@f14g2000cwb.googlegroups.com>
| MIME-Version: 1.0
| Content-Type: text/plain
[quoted text clipped - 9 lines]
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:31231
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
[quoted text clipped - 7 lines]
|
| #Exception Management Architecture Guide
http://msdn.microsoft.com/library/en-us/dnbda/html/exceptdotnet.asp?frame=tr
| ue
|
[quoted text clipped - 39 lines]
| | posting-account=X7ANQg0AAAB-ENGC8U9YFBV5V2pedTsn
| | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.gigan
| ews.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail
| | Xref: TK2MSFTNGXA02.phx.gbl
[quoted text clipped - 19 lines]
| | client side. So does it add any value in specifying them in the .wsdl
| | at all? What are some of the best practices in this area?
cat - 12 Jan 2006 00:16 GMT
I'm more towards using a different approach: return an enum
1. a switch statement to check the returned value, or a set of catch ( ...)
blocks is pretty much the same; you have to define the returned/thrown items
and handle them anyways
2. re "client could completely ignore the status code": you could to that
with an exception, but not trapping or using catch ( Exception ex )
3. security issues: the information from an exception could expose to a
hacker the structure of your application/webservice
4. the client side proxy code could reflect changes in the values of the
enum; if you change the exceptions thrown by the service, or add new ones,
you gotta make sure you convey that to all your clients cuz no proxy code
generator will do that for you
5. marshalling an exception across application domains is very expensive,
and will make your application less scalable (it's several orders of
magnitude slower than a return value)
> Hi Chen,
>
[quoted text clipped - 114 lines]
> | | client side. So does it add any value in specifying them in the .wsdl
> | | at all? What are some of the best practices in this area?