Thursday, January 03, 2008

Soap Extensions in web forms client

On my current project, I need to consume a web service from a Windows Client, the web service is decorated with a custom attribute on the server side that causes the SOAP message to be compressed, this code was written by another developer but I think he got it from here. In order to uncompress it on the client, I needed to reference the assembly that contained the SoapExtension in my client and add the following section to the app.config:

<system.web>

<webServices>

<soapExtensionTypes>

<add type="myCompany.myProject.WebServices.SoapExtensions.CompressionExtension,myCompany.myProject.CompressionExtensionLib"

priority="3" group="High" />

soapExtensionTypes>

webServices>

system.web>


The first part of the type is the fully qualified class name, the second part is the namespace.

No comments: