Re: Custom SoapFilter for WSE 3 and Exceptions
- From: "Stephan Zahariev" <NearSoft@xxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Jan 2007 10:41:30 +0200
Hello Steven,
I'm sorry about the inability to catch original exception inside WSE filter,
but custom SOAP extension will do the job.
Thank you for the complete and helpful answer.
Stephan Zahariev
"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:XjqwuxfPHHA.2304@xxxxxxxxxxxxxxxxxxxxxxxxx
Hello Stephan,
From your description, I understand you're developing a soapFilter to
intercept some info from the soap message of each webservice method call.
However, for exceptions occured in webmethods, you found that they're
always encapsulated as a SoapException object. So you wonder how to get
the
original exception info, correct?
Based on my understanding, for ASP.NET webservice, all the server-side
unhandled exceptions will be wrappered with a SoapException and then the
SoapException will be serailzied as XML element and contained in SOAP
message's <fault> standard element. Therefore, if you want to get
original
exception info at cilent-side, you may need to lookup the properties of
SoapException.
for server-side, in your case, you're using custom WSE SoapFilter, the
SoapEnvelope's "Fault" property contains the SoapException that will also
be captured at client-side. And it doesn't contain the original exception
info(be encapsulated into SoapException's properties).
So far, to intercept the raw exception info in ASP.NET
webservice(server-side), one way is to use SoapExtension. The
SoapExtension's ProcessMessage method pass in a SoapMessage class
instance,
it contains a "Exception" property and this Exception instance's
"InnerException" property refer to the original unhandled exception. Here
are some web articles describing on this:
#User Friendly ASP.NET Exception Handling
http://www.codeproject.com/aspnet/ASPNETExceptionHandling.asp
#Exception Injection Using a Custom SOAP Extension
http://haacked.com/archive/2005/06/29/ExceptionInjectionUsingCustomSoapExten
sion.aspx
Actually, the WSE 3.0 component itself is implemented as a SoapExtension,
and since it has remove the original exception from the SoapEnvelope, you
can not get the original exception instance directly in WSE custom Filter.
Hope this helps some. If you have anything unclear on this, please feel
free to let me know.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: Custom SoapFilter for WSE 3 and Exceptions
- From: Steven Cheng[MSFT]
- Re: Custom SoapFilter for WSE 3 and Exceptions
- References:
- Custom SoapFilter for WSE 3 and Exceptions
- From: Stephan Zahariev
- RE: Custom SoapFilter for WSE 3 and Exceptions
- From: Steven Cheng[MSFT]
- Custom SoapFilter for WSE 3 and Exceptions
- Prev by Date: Installing the dev certificate
- Next by Date: Re: Custom SoapFilter for WSE 3 and Exceptions
- Previous by thread: RE: Custom SoapFilter for WSE 3 and Exceptions
- Next by thread: Re: Custom SoapFilter for WSE 3 and Exceptions
- Index(es):
Relevant Pages
|
Loading