XML Web Services

   

Perhaps the technology that Microsoft is most excited about in .NET is XML Web services. Microsoft describes an XML Web service as "a unit of application logic providing data and services to other applications." It's easiest to think of XML Web services as applications that reside on a server without a user interface, providing objects to clients . The following are a few practical examples of what can be done with XML Web services:

  • A company could create stock quote XML Web services that clients could use to get real-time stock quotes.

  • A doctor's office could expose scheduling functions so that clients could use their mobile devices to schedule appointments.

  • A government office could expose tax- related objects, which businesses could use to get accurate tax rates.

  • A company could expose data that is paid for by subscription. When clients access the data via the Web service's objects, a billing system could track the number of accesses .

  • An auction company such as eBay could expose its bidding system as authenticated XML Web services, and third-party vendors could create their own front ends to placing bids on the auction site.

Obviously, this list just scratches the surface. Microsoft ambitiously envisions everyone exposing application logic as XML Web services. Although this may not become a reality in the near future (indeed, XML Web services may never take off like Microsoft hopes), many companies are generating a lot of excitement about this technology.

As a programmer, a lot of the details of XML Web services are handled for you by .NET. For example, SOAP and XML are used to marshal objects and method calls across the Web so that you don't have to worry about the details of the plumbing. Because a standard protocol is used to marshal this information, you don't have to worry about the language or the platform used to implement the XML Web services ”almost any type of client can consume XML Web services (C#, Visual Basic, Java, and so on). Clients don't even have to be Windows based or even be PCs; Web-enabled phones and other wireless devices can consume XML Web services.

Writing code to consume XML Web services is actually similar to writing code to access an Automation server. First, you create a Web reference, which is much like creating a reference to an Automation library such as Excel or ADO. After you've got a reference to the XML Web services, the objects become available in code, and you can browse them as you would "traditional" objects.

To create XML Web services, you have to have a sound understanding of creating objects by programming classes, and you have to learn ASP.NET ”the underlying technology of XML Web services. The .NET Framework handles the details of using SOAP to allow clients to interact with your XML Web services, so you focus most of your attention on creating useful objects rather than on details of the underlying plumbing.


   
Top


Sams Teach Yourself C# in 24 Hours
Sams Teach Yourself Visual Basic 2010 in 24 Hours Complete Starter Kit (Sams Teach Yourself -- Hours)
ISBN: 0672331136
EAN: 2147483647
Year: 2002
Pages: 253
Authors: James Foxall

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