Client Development

Description Article
Table of Contents
Operations
Consuming services
How to do it

The ASP.NET web services can be consumed through:

  • Using an HttpWebRequest to invoke the service through the correspondent URL of the endpoint; or
  • Service proxy

Service Proxies

A service proxy enables the use of the services in an object-oriented way:

  • Proxy classes abstracts the communication model used by the service;
  • Proxy classes implement the service interface of the service and enable the Client to call methods on the service interface as if these are local methods.

Proxy Option 1: Automatically generated service proxy to the ASP.NET Web Service

The proxy can be generated through the Add Web Service Reference feature of Visual Studio.
This is a menu option that works as a wrapper around the “WSDL.exe” utility, spawning a process with the necessary parameters, namelly the Uri of the ASP.NET web service.

The output will be the proxy implementation class and added to the project.

Proxy Option 2: Command-line generated service proxy to the ASP.NET Web Service

The proxy can be manually generated at command-line by calling directly the “WSDL.exe” utility.
The output will be the proxy implementation class to be then added to the project.