Bagikan melalui


How to: Explore Existing XML Web Services Created Using ASP.NET

This topic is specific to a legacy technology. XML Web services and XML Web service clients should now be created using Windows Communication Foundation.

Once you know the URL for a Web service created using ASP.NET, you can use the URL to access a Web page known as the service help page. This page provides information about the functionality of the Web service, including the Web service methods it implements, their parameters, and their return types. In addition, you can use the service help page to test the functionality of the Web service.

For example, suppose you are accessing a Web service called Investor, which is used to retrieve the stock price for a valid stock symbol. You know the base URL for this Web service is https://www.contoso.com/Investor.asmx. Entering this URL into a browser with no extensions or parameters produces a Web page with information about the Web service and the Web service methods it implements.

In addition to viewing information about the Web service in the browser, you can also obtain a more formal definition of the Web service by viewing its service description, which is an XML document written in the Web Services Description Language (WSDL). A link at the top of the service help page allows you to view the service description. You can use the service description to manually generate a proxy class to the Web service. For more information about creating a proxy class, see Creating an XML Web Service Proxy.

To access the service help page for a Web service

  1. In your browser's address bar, enter the base URL for the Web service, using the following format:

    https://servername/vrootname/webservicename.asmx
    

    Parameter Value

    servername

    The Web server on which the Web service resides.

    apppath

    The name of the Web application that is hosting the Web service.

    webservicename.asmx

    The name of the file where the Web service is defined.

    For example, to access a Web service called StockServices.asmx, residing on a Web server named StockTicker, enter the following:

    http://StockTicker/StockServices.asmx
    

To access the service description for a Web service

  1. Access the service help page for the Web service as just described.

  2. Click the Service Description link at the top of the page.

See Also

Tasks

How to: Access XML Web Services from a Browser

Concepts

Building XML Web Service Clients
Web Services Discovery
Creating an XML Web Service Proxy
Communicating with XML Web Services Asynchronously

Other Resources

Creating Clients for XML Web Services