Today you learned how to access Web Services from client ASP.NET pages. Consuming Web Services is just as important to ASP.NET developers as building them.
Consuming Web Services from a client involves three stages: discovery, proxy class generation, and implementation of the proxy.
The disco tool is used to perform discovery on a service. It produces two files as output: one that describes the results of the discovery (typically called results.discomap), and another that contains the same contents as the discovery file residing on the server.
The Web Services Description Language tool, wsdl.exe, is used to generate a proxy class. This class has methods to execute the Web service commands remotely by providing built-in support for sending and receiving XML messages using SOAP. Once the class has been generated, you compile it just like any other business object. Then you can execute the service's methods through the proxy class from within your application.
You also looked at securing Web Services with custom SOAP headers. These headers are sent in addition to any messages sent to the service.
Tomorrow you'll look at configuring your ASP.NET applications. Throughout this book, you've seen examples of using the web.config or global.asax files, and you'll learn exactly what they do and how to use them to your advantage.