Add a web service to a Visual Studio project

Visual Studio provides a sophisticated ability to include web services in projects. Let's take a closer look at this popular programming IDE.

Note: The following instructions were carried out using Visual Studio 2017; instructions for other versions may vary.
  1. Firstly, create a new project:

  2. After the project is created, add a service reference to the project:

  3. In the Add Service Reference dialog box, enter the URL of the .srf file that is the endpoint of the service:

  4. Click Go to fetch the WSDL, which is then displayed in the dialog box.

    The methods available in the service are listed in the Operations column.

  5. Click OK to complete adding the service to the project.

    Proxy functions are created for the operations (methods) and the service appears in the Solution Explorer.

    The generated proxy functions allow you to use the web service's methods in a manner identical to any other function.