Chapter 17. Consuming Web Services

While Chapter 15 gave an overview of web services and Chapter 16 described in detail how to create a web service, this chapter explains how to create a web service client application or web service consumer. The consuming application can be a web page, another web service, or a desktop application.

Once a web service is created and made available to consumers on the Internet, it is up to the developer creating the client application to find the web service, create the client proxy, and incorporate the proxy into the client. The client can then make method calls against the remote web service as though it were making local calls. In fact, the client application is making local method calls against the proxy—it just behaves as if it is making calls directly to the web service over the Internet.

Discovery

Discovery is the process of finding out what web services are available, what methods and properties are exposed by a specific web service, what parameters those methods and properties expect to receive, and what data type the web method returns. All of this information is contained in the WSDL (Web Services Description Language) document, introduced in Chapter 16.

Discovery is an optional process. If the consuming developer knows the URL of the web service file (.asmx) itself, then there is no need to do discovery. However, it will often be the case that the consuming developer will not know the location of the web service file or the WSDL document. ...

Get Programming ASP.NET, Second Edition 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.