Sams Teach Yourself Visual Studio .NET 2003 in 21 Days

Sams Teach Yourself .Net in 21 Days

By Jason Beres

What Are XML Web Services?

XML Web services are application components that can expose functionality over hypertext transfer protocol (HTTP) using the simple object access protocol (SOAP). Using Web services, you have the ability to expose methods in your applications to anyone on the Internet.

Before .NET, one of the biggest challenges developers had to work around was getting data from their servers to another server without compromising security. If you had a component that returned customer information, and you wanted to let someone outside your network access that component, your task wasn't easy. You had to configure the distributed component object model (DCOM) and somehow manage to let the caller of the component authenticate on your server, create an instance of the component, and then call methods on the component. This wasn't easy to implement, so there was a lot of code written to work around the limitation of exposing application functionality in a safe way.

With XML Web services, these limitations are no longer an issue. By wrapping application logic into a Web service, anyone can access the methods in your components over port 80 using HTTP. No special configuration needs to be in place. When a call is made to a Web service, the information is passed back to the caller using XML. Yesterday, you learned how XML is the best way to pass data around the Internet because it's just plain text. Web services take advantage of this by using XML as the backbone of the core Web service infrastructure.

Besides the technical aspects of not having to open any special ports, risk security holes, or configure DCOM to allow others access to application functionality, Web services give you the ability to write cross-platform applications immediately. Any application running written in any language running on any operating system can make a Web service request. It's just like calling any URL on the Internet. How it's implemented is irrelevant; the fact that you can send and receive information in a simple and secure manner is what matters.

Understanding How Web Services Work

Web services are built on open Internet standards and protocols. The common protocols that make Web services work are HTTP and SOAP. Understanding the internals of these protocols isn't important. Like TCP/IP (transmission control protocol/Internet protocol) and IPX (internetwork packet exchange) define how data is transferred over a network, HTTP defines how data is passed over the Internet and SOAP defines how XML must look when being consumed as a Web service being transmitted over HTTP.

To summarize, Web services are application components that can be consumed over the Internet using open standards. You can use tools of the UDDI repository to search for Web services, or you can discover what Web services are available at specific sites if the sites provide a DISCO file. When you find a Web service, you can inspect its functionality through its WSDL file. Every aspect of creating and consuming Web services uses XML, so they're both cross-platform and cross-language.

Share ThisShare This

Informit Network