5.5. Implementing Header Handlers

In Chapter 3, you saw how SOAP headers can extend SOAP by sending information outside the message body. The SOAP toolkit lets you send and receive SOAP headers by implementing an interface called IHeaderHandler. In this section I'll show you how to expose services that use headers and how to invoke a service that requires them.

5.5.1. Exposing Services with Headers

Consider the simple server class called Stores in Listing 5.15. This server exposes two properties named UserId and Password. At runtime, it assumes these properties have been populated before GetStoreSales is called.

Listing 5.15. A GetStoreSales implementation that relies on SOAP headers for getting user id and password (VBWSBook\HLHeaderServer\Stores.cls) ...

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.