views:

202

answers:

1

Hi

I'm trying to write a soap extension. But the framework is not loading it.

I've added to the web.config

<webServices>
    <soapExtensionTypes>
     <add group="High" priority="1" type="Lisa.Admin.SoapExceptionExtension,Lisa.Admin" />
    </soapExtensionTypes>
</webServices>

and even if I change the type to some bullshit It does not cast an exception.

A: 

I have been having a problem with similar behaviour but I don't know if it's exactly the same.

When writing, compiling and applying my SoapExtension, in web.config and on my web method, everyting seems to work correctly, but when accessing my web service my extension was not being used. I think I just figured this one out.

It looks like the extension is not being used when making requests to the web service through the test pages (via a browser). If you, on the other hand, add a web reference to a console application the extension is being called.

Hope this is your problem and my answer will help you.

Edit:

Just read a little more; the reason seems to be that when using the test-pages, the HTTP-POST protocol is being used to access the web methods and the SOAP protocol is not involved, ALAS SoapExtensions are not being called.

Alfred B. Thordarson
If I remember correctly. The problem was I was using the Javascript interface of the web-service and therefore not using SOAP and not loading any SOAP-extensions.
Thorgeir