Consuming Web Services Asynchronously

Not every web service returns results instantly, and those results often comprise extremely large amounts of data. Due to the latency of construction of SOAP envelopes and message overhead, web services lend themselves more toward a messaging infrastructure rather than an RPC (Remote Procedure Call) infrastructure. Because of that, the most efficient way to use web services is to make fewer calls with more data per call, rather than making frequent, small-data calls. As a result, some method calls to web services can take a significant amount of time to execute.

For example, you might be using a web service to perform some kind of search through a vast amount of records. The search itself could take a significant ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.