7.5. You Must Understand This

If the client can send you arbitrary headers, there's a good chance your service will not understand what to do with them. This can cause problems if the client is counting on your service to process the headers. To solve this problem, the client can mark those headers with soap:mustUnderstand="1" to indicate that the service has to understand and process the header or return a <soap:Fault>.

You can do this using the SoapHeader's DidUnderstand property, which is a Boolean indicating if the service understood the specified header.

Listing 7.9 shows an example Web method that looks through all undefined attributes and sets each attribute's DidUnderstand property to False unless the attribute is called TransactionInfo ...

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.