Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Step 2: Adding a Web Reference

Web service discovery is the process by which a client locates a Web service and obtains its service description. The process of Web service discovery in Visual Studio involves interrogating a Web site following a predetermined algorithm. The goal of the process is to locate the service description, which is an XML document that uses the Web Services Description Language (WSDL).

The service description describes what services are available and how to interact with those services. Without a service description, it is impossible to programmatically interact with a Web service.

Your application must have a means to communicate with the Web service and to locate it at run time. Adding a Web reference to your project for the Web service does this by generating a proxy class that interfaces with the Web service and provides a local representation of the Web service. For more information, see "Web References and Generating an XML Web Service Proxy" in the Microsoft Visual Studio 2005 documentation.

  1. On the Project menu, click Add Web Reference.

  2. In the URL box of the Add Web Reference dialog box, type the URL to obtain the service description of the Excel Web Services, such as http://<server>/<customsite>/_vti_bin/excelservice.asmx or http://<server>/_vti_bin/excelservice.asmx. Then click Go to retrieve information about the Web service.


    You can also open the Add Web Reference dialog box in the Solution Explorer pane by right-clicking References and selecting Add Web Reference.

  3. In the Web reference name box, rename the Web reference to ExcelWebService.

  4. Click Add Reference to add a Web reference for the target Web service.

  5. Visual Studio downloads the service description and generates a proxy class to interface between your application and Excel Web Services.

  6. For more information, see Accessing the SOAP API.

Community Additions

© 2015 Microsoft