
The ELN client communicates with the eNotebook server using XML messages sent over the HTTP protocol. The format of each request/response message is the Simple Object Access Protocol (SOAP) XML structure. Client and server components carry the task of serializing and de-serializing the SOAP messages into memory based objects. There may be a sufficient processing overhead to serialize/de-serialize larger SOAP messages. In addition, there is a larger Input/Output (IO) cost for transferring the bigger messages over the network.
Various server requests have very large web service response messages. For example, a search sends the encoded array of bytes representing the structures as an input and with up to 1000 responses that may also include large structures. The larger the data being transfer over the network, the longer the response time.
.NET web service framework (along with the IIS web server) supports auto compression and decompression of web service requests and responses.
The SOAP XML Web service client typically uses a proxy class that derives from the .NET SoapHttpClientProtocol object. The service client is often generated by the Web Services Description Language tool (Wsdl.exe). All web service clients developed with the .NET framework (2.0 or higher) exposes the Boolean property EnableDecompression. EnableDecompression can be used to indicate whether decompression is enabled. Setting the EnableDecompression option to true on the service proxy will allow all client request/response to be sent in a compressed format.
Sample service proxy code to enable decompression;
|
ServiceProxy proxy=new ServiceProxy(); proxy.EnableDecompression = true; |
The IIS server must also be configured to enable compression of replies from Web services. When IIS receives a request, it checks to see if the client's compression is enabled. IIS compresses the response as it is generated and sends the compressed response to the client.
The following are the sample steps to enable compression on the IIS server. Note the steps 4-6 are optional.
Also see http://support.microsoft.com/default.aspx?scid=kb;en-us;322603
Or http://www.angryhacker.com/blog/archive/2007/09/08/iis-compression-and-.net-web-services.aspx
Pros
Cons