10.6. A Compression SOAP Extension
The preceding SOAP extensions read the request message and take the appropriate actions based on what's in the message and how they are configured. Now I'll show you a SOAP extension that modifies the message stream on both the client and service sides. Listing 10.10 shows the CompressExtension SOAP extension class.
Listing 10.10. The compression SOAP Extension (VBWSBook\Chapter10\Infrastructure\Compress.vb)
Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Configuration Imports System.IO Public Enum CompressionTypes GZip None End Enum Public Class CompressExtension Inherits System.Web.Services.Protocols.SoapExtension Private _CompressionType As CompressionTypes Private _workStream ... |
Get Real World XML Web Services: For VB and VB .NET Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.