15.6. Consuming a web service
As with web services, we can create web service consumers with any tool we like. Consumers communicate with web services via standard protocols – SOAP, HTTP-GET, and HTTP-POST – and exchange XML-encoded messages.
Using the HTTP-GET protocol
Let’s start with the simplest type of web service client – one who uses the HTTP-GET protocol to communicate with the service. If we navigate to the URL of our web service – http://localhost/WebServices/wsdemo.asmx in our example – then click on the method name in the first screen (see Figure 15.4 earlier in this chapter), we will get the default web service consumer autogenerated for us by .NET. It uses HTTP-GET protocol to communicate with the web service. Here is the GET ...
Get A Programmer's Guide to .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.