Writing the Client
To create a client that uses your new web service, create a new (normal) ASP.NET web site called StockPriceClient, as shown in Figure 14-6.
Your client will need knowledge of your web service. The easiest way to provide that knowledge is to create a web reference. Right-click on your project and choose Add Web Reference, as shown in Figure 14-7.

Figure 14-5. WSDL document

Figure 14-6. Creating client web site
The Add Web Reference dialog will open. If you have created the web service on the same machine as the client, click on "web services on the local machine," as shown in Figure 14-8.
Warning
If you have been using file-based web applications, you'll need to create a virtual directory in IIS to point to the web service, for this web reference to work.

Figure 14-7. Add Web Reference

Figure 14-8. Choosing local web service
Once you click on Service, the Add Web Reference dialog will locate the service (and bring up the test page). Give your service a reference name (a name by which you can refer to it in your code) and click Add Reference, as shown in Figure 14-9.
Figure 14-9. Name ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access