O'Reilly logo

Beginning XML, 4th Edition by Andrew Watt, David Hunter, Linda McKinnon, Joe Fawcett, Eric van der Vlist, Jon Duckett, Danny Ayers, Jeff Rafter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Web Services

So far, we've covered what XML is and how to create well-formed and valid XML documents, and you've even seen a couple of programmatic interfaces into XML documents in the form of DOM and SAX. We also discussed the fact that XML isn't really a language on its own; it's a meta language, to be used in the creation of other languages.

This chapter takes a slightly different turn. Rather than discuss XML itself, it covers an application of XML: web services enable objects on one computer to call and make use of objects on other computers. In other words, web services are a means of performing distributed computing.

This chapter includes the following:

  • What a remote procedure call (RPC) is, and what RPC protocols exist currently

  • Why web services can provide more flexibility than previous RPC protocols

  • How XML-RPC works

  • Why most web services implementations should use HTTP as a transport protocol, and how HTTP works under the hood

  • How the specifications that surround web services fit together

What Is an RPC?

It is often necessary to design distributed systems, whereby the code to run an application is spread across multiple computers. For example, to create a large transaction processing system, you might have a separate server for business logic objects, one for presentation logic objects, a database server, and so on, all of which need to talk to each other (see Figure 14-1).

In order for a model like this to work, code on one computer needs to call code on another computer. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required