Accueil>Produits>

Devolutions WSE

Overview

Devolutions WSE is a small library build to simplify and enhance Web Service error handling. The goal is to simplify error handling with a centralized event. When an exception is raised in a Web Services, ASP.Net catch the error and return it as a SOAP fault.

The problem is that the HttpApplication.Error event is never raised. If an error logging is needed, there is no place to put the code. There is only two solutions. put a try catch in every web method or write a SoapExtension. That's what is done in Devolutions.WSE.

Getting started

Samples

Instructions

Copy Devolutions.WSE.dll in the bin folder of your Web services and add these lines in your configuration file (Web.config).

<webServices>
    <soapExtensionTypes>
        <add
        type="Devolutions.WSE.ErrorSoapExtension,
            Devolutions.WSE"
            priority="1" group="0" />
    </soapExtensionTypes>
</webServices>

Implement the Error event of ErrorSoapExtension and handle the error here.

You can set ErrorSoapExtension.ReturnErrorAsHtml to true if you want to return error as an HTML page instead of SoapFault. HTML pages are easier to debug but it's not the standard error handling mechanism.

Please note that SoapExtension are not called in the ASP.NET WebServices test page. This means that the error will not be handled in the Internet Explorer test page.