The test is working, but you want to create a Windows client that uses the Web service. The client must create a SOAP message that will be sent across an HTTP channel. It is not necessary to make this message ourselves. The System.Web.Services.Protocols.SoapHttpClientProtocol class does all the work behind the scenes.
Try It Out Creating a Client Windows Application
Create a new C# Windows Application, call it SimpleClient, and add two text boxes and a button to the form (see Figure 20-12). You will use the button's Click handler to invoke the Web service.
Figure 20-12
Add a Web reference using the Project Add Web Reference... menu and enter the URL of the Web service that was just generated. Then, you can view the contract and documentation. Before pressing the Add Reference button, change the Web reference name to WebServicesSample, as shown in Figure 20-13.
Figure 20-13
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.