O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required