Consuming a Web Service in .NET

In order for a .NET program to communicate with a Web Service, the Web Services Description Language (WSDL) file must first be consumed. The consumption process reads the WSDL file and creates all the necessary classes and code to be used in the development of a program within .NET.

In .NET, perform the following steps:

  1. Select Add Web Reference from the Project menu.

    The Add Web Reference screen appears.

    project menu

  2. Enter the location of the WSDL file, as shown in the following image.

    project menu

  3. You can also enter the URL for the WSDL creation utility, as shown in the following image.

    Add Web Reference image

  4. You can also enter the URL for the specific Web Service, as follows.

    Where target_machine:port is the name and port number of the machine where ReportCaster is installed.

    The following image shows the Schedule Manager Service URL.

  5. Add Web Reference image

  6. Once the list of Methods appears, enter the Web Reference name that will be used to access the set of Web Service functions, as shown in the following image, then click Add Reference.

    Web Reference image


WebFOCUS