10.3. Using Web Services in Ajax Web Sites
The ability to call Web Services from any Ajax-enabled ASP.NET web site is a great addition to your web development toolkit. Being able to call arbitrary Web Services accessible over the Internet means it's now much easier to access data at the client from other sources, such as your own web site, or external web sites that enable you to access their data through public Web Services, such as Google Search, Google Maps, Amazon, and Microsoft's Virtual Earth.
Before you can create and consume Web Services in your own application, it's important to understand what a Web Service is, and how you define one in your ASP.NET project.
10.3.1. What Are Web Services?
Web Services are essentially methods that you can call over the Internet and that can optionally return data to the calling code. This makes them ideal for exchanging data between different systems. Because Web Services are based on solid and well-understood standards, they make it easy to exchange data between different types of platforms. For example, with a Web Service it's easy to exchange data between an ASP.NET web site running on Microsoft Windows and a PHP-based site running on Linux. But at the same time, it's also possible to exchange data between an ASP.NET web site and a client browser using JavaScript.
The Web Services in the Planet Wrox project will only be used to have a client page in the browser talk to the server and exchange data. So, in this site, both the server ...
Get Beginning ASP.NET 3.5: In C# and VB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.