Tuy nhiên, theo bao gồm, sẽ chuyển tiếp tất cả các phương pháp proxy cuộc gọi đến các dịch vụ từ xa để thực hiện. Nếu Visual Studio diễn giải các tập tin thành công, bạn sẽ thấy một danh sách các phương pháp có sẵn (GetStockQuotes trong ví dụ trong hình 2-14). | 24 CHAPTER 2 BASICS OF WEB DEVELOPMENT WITH Figure 2-14. Creating a web reference Visual Studio will then create a special type of class called a proxy. This is simply a local representation of the remote service allowing you to call methods as if they were implemented on your local computer. However under the covers will forward all of the proxy method calls to the remote service for execution. If Visual Studio interprets the file successfully you will see a list of available methods GetStockQuotes in the example in Figure 2-14 . You can then create a name for the web reference and add the reference to your project. At this point in your project you can create an instance of the web reference proxy class and call the method on it to get data back from the web service. In fact let s do that now so that we can call a remote web service to obtain stock quotes for our example. Right-click the project name and select Add Web Reference. When the Add Web Reference dialog box appears type http soap urn into the URL field and click Go. We ll be using a service provided by XMethods that reports delayed stock quotes given a stock ticker symbol. You can see this in Figure 2-14. After clicking Go Visual Studio contacts XMethods downloads the WSDL and displays the available methods it finds for you to review. Note the value in the Web reference name field which will ultimately form the namespace of the proxy class you ll be using. Change the value you find there to QS for quote service and then click Add Reference. At this point CHAPTER 2 BASICS OF WEB DEVELOPMENT WITH 25 Visual Studio converts the WSDL into a C class the proxy and stores it under the App_WebReferences folder which Visual Studio also creates for you. Later in the chapter we ll use this quote service to actually retrieve stock quote values. Copy Web Site This enables you to copy your web site to a .