Introducing Web Services
This chapter covers the fundamentals of creating and using Web Services, an exciting new way of creating programs that anyone with access to the Internet can use. Although Web Services use sophisticated mechanisms and protocols to communicate with clients, .NET makes the job of creating and using Web Services easy.
Web Services are programs with methods that can be called over the Internet. Web Services allow you to create distributed applications, or applications that live on a number of different computers. The .NET framework and ASP.NET provide all the underlying mechanisms to make your program Web accessible. .NET provides all the plumbing for Web Services so that you can focus on developing your application.
This chapter describes the following:
Why Web Services are a viable technology
How to create a Web Service
How to create Web Service clients with the .NET framework utilities
How to create Web Service clients with Visual Studio.NET
How Web Services work
Why Use Web Services?
Already, a number of technologies allow you to create distributed applications, including CORBA, DCOM, RPC, and custom solutions based on TCP sockets. Because these technologies are already in place and are quite mature at this time, why would you or your company make the leap to Web Services?
You might choose Web Services for a number of good reasons if you plan to make a distributed application:
Web Services are built on industry standard protocols, such as TCP, SSL, XML, SOAP, and WSDL. We'll explain these protocols in detail later in the chapter.
Web Services are easyeven trivialto implement with .NET. If you've ever tried to implement a CORBA or DCOM solution, you'll be pleasantly surprised by how painless Web Service implementation and configuration are with .NET and ASP.NET.
You don't need a lot of infrastructure in place to develop a Web Service. The only real requirements are a Web server and a connection to the Internet.