Before UDDI and SOAP


Finding a Stock Quote Web Service

Throughout this book, the stock quote Web Service is mentioned as an example. So far it has just been theoretical—an easy example to help you understand what a Web Service is meant to do. Now that you understand a little bit about UDDI, you can search for a real stock quote Web Service. Start out by going to Microsoft’s UDDI Web site at http://uddi.microsoft.com. Figure 5.1 shows you the home page.

click to expand
Figure 5.1: Microsoft’s UDDI home page.

In the upper lefthand corner, there is a link for search. Click there and you’ll see the search page shown in Figure 5.2.

click to expand
Figure 5.2: The search page at http://uddi.microsoft.com.

On the righthand side of the frame set shown in Figure 5.2, select the services tab so that you can search by the type of service. Then enter stock quote as the type of service that you’re searching for.

Note

Note that there are several ways that you can search for information on Microsoft’s UDDI Web site, as you can see on the tabs on the righthand side of the site. You can browse by category, service, provider, and tModel. tModel stands for technical model. It represents a reusable idea, including the type of Web Services, which protocol a Web Service uses, or some sort of category such as providing stock values or even what size bicycle you should purchase.

The search for stock quotes under services brings back several choices for you to use (see Figure 5.3).

click to expand
Figure 5.3: The results of the search for stock quote Web Services.

The results show up on the lefthand side of the Web page. Start browsing them to find a Web Service that has a WSDL file, so you can use a .NET Web Service.

Tip

Any Web Service whose suffix ends with “asmx” indicates that it is an implementation of the Web Services available in Microsoft’s .NET environment. By simply adding “WSDL” in the query string, the WSDL file is retrieved for you. For example, let’s say that you have a Web Service at the following URL: http://localhost/Xplatform/SomeService.asmx. By simply changing the URL to the following, the WSDL file is revealed: http://localhost/Xplatform/SomeService.asmx?WSDL.

By clicking around to search, you may not find the Web Service that you need. Another way to search the repository is by provider. Go back to the search page and select the tab on the lefthand side that says “providers.” Enter the name “Cdyne” into the text box that asks for provider name and then click on search. Figure 5.4 shows the services that “Cdyne” makes available.

click to expand
Figure 5.4: Web Services available from “Cdyne.”

In this example, the company “Cdyne” offers a stock quote Web Service. However, instead of just a link to the service, the information on this page gives some details about the company and actual contact information. This includes a contact if there is a problem reaching the Web Service.

Clicking on the “stock quotes” link gives you the information needed to actually utilize the Web Service. Figure 5.5 displays the results of this search in Internet Explorer.

click to expand
Figure 5.5: Further details of the stock quote Web Service.

This page on the UDDI site provides greater detail to the service; you can see that the service provides stock quotes that are 15 to 20 minutes delayed. The long alpha-numeric values in the “Binding Key” column next to the “Service Detail” are unique keys generated by the UDDI site when creating the entry. All of this information can be found by clicking through the various tabs in the righthand frame for the stock quote Web Service.

For even more information on this company, click on “Cdyne” in the lefthand pane of the frame set and then click on “discovery URLs” on the righthand frame set. Click on one of the discovery URLs and you’ll find the XML for the UDDI entry for this company. Figure 5.6 displays the UDDI XML in Internet Explorer.

click to expand
Figure 5.6: The UDDI XML entry for “Cdyne.”

This provides some further information, but the item of main importance here is the link to the WSDL file. This is useful for determining what methods are available and for adding references or creating proxies in Visual Studio.NET. Note that the suffix on the Web Service is “asmx.”




Cross-Platform Web Services Using C# and Java
Cross-Platform Web Services Using C# & JAVA (Charles River Media Internet & Web Design)
ISBN: 1584502622
EAN: 2147483647
Year: 2005
Pages: 128

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