14.5. Testing Your Web Service


Before you create a client for your web service, you can have Visual Studio 2005 create a test page for you. Just run the program in the debugger, as shown in Figure 14-2.

Figure 14-2. Testing the web services


Click on GetName, for example. You will be prompted to enter a stock symbol, as shown in Figure 14-3.

Figure 14-3. Testing GetName


Enter a valid stock symbol (one of the symbols in the array) and the stock's name is returned in an HTML document, as shown in Figure 14-4.

Figure 14-4. Value returned as XML


14.5.1. Examining the WSDL

You can examine the WSDL (Web Service Description Language) document for this web service by adding ?WSDL after the URL, as shown in Figure 14-5.

There are three things to notice in Figure 14-5. First, the URL is identical to the URL that brought up the test document, except that the string ?WSDL is appended. Second, both the GetValueStockInPorffolio and GetValueThisManyShares methods are shown (the names used in the MessageName property), but the GetValue method does not appear. The SOAP document (and thus the WSDL document) does not use the class's method name, but rather uses the unambiguous MessageName property.



Programming Visual Basic 2005
Programming Visual Basic 2005
ISBN: 0596009496
EAN: 2147483647
Year: 2006
Pages: 162
Authors: Jesse Liberty

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net