Preface

XML-RPC takes web technology in a new direction, giving you a new way to create simple, but powerful, connections between different kinds of programs. After wasting more hours than I care to admit developing and documenting network formats used to exchange relatively simple kinds of information between programs, I was very happy to discover XML-RPC. It would have made all that work much easier.

Whether you integrate systems within a single network or provide services and information to the public as a whole, XML-RPC provides critical layers of abstraction that make it simple to connect different kinds of computing systems without needing to create new standards for every application. Because XML-RPC is built on commonly available HTTP and XML technologies, the costs of implementing it are low. Because XML-RPC focuses sharply on solving a particular kind of problem -- making procedure calls across a network -- it is very easy to learn and implement across a wide variety of systems.

Audience

Any developer who needs to share information between programs running on different computers will find this book useful, but two classes of developers will find it especially worthwhile:

Integrators

Developers focused on making distributed, and often dissimilar, systems communicate with one another may find that XML-RPC solves some of their thorniest problems in an easier way.

Web developers

Developers wanting to make the information they provide on human-readable sites more widely available will find XML-RPC a useful tool for sharing information that can be processed by task-specific programs, not just browsers.

XML-RPC provides an enormous amount of flexibility for both groups because it allows them to build services without having to know in advance what kind of client or server is on the other end of the connection.

This book assumes that you have programming skills in the language(s) you plan to use (we cover Java, Perl, Python, PHP, and ASP) and that you have general experience with web technologies. You should know what web servers and firewalls do, for instance, and have at least a user’s grasp of TCP/IP networking.

This book includes appendices that explain the amount of XML and HTTP needed for XML-RPC, so you don’t need to understand XML or HTTP to get started with XML-RPC. To use XML-RPC, you don’t need to know an enormous amount of the detail underlying the specification, but it can help in many situations.

Organization

The first two chapters of this book orient you with XML-RPC concepts. The subsequent five chapters discuss implementing XML-RPC clients and servers using various popular programming/scripting languages. The final chapter gives a broader view of the XML-RPC landscape. The two appendices provide useful reference material for some associated technologies. Here’s the chapter breakdown:

Chapter 1, gives an overview of what XML-RPC does, its origins, and what it’s good at.

Chapter 2, describes the sequence and structure of requests and responses required to invoke computations on a remote machine using XML. The chapter also covers the various XML-RPC data types.

Chapter 3, demonstrates how to build XML-RPC clients, servers, and handlers using the Java programming language.

Chapter 4, walks you through the development of XML-RPC clients and servers using the Perl scripting language and shows you how to embed an XML-RPC server in a web server.

Chapter 5, covers XML-RPC clients and servers created using the PHP scripting language.The chapter also demonstrates the integration of two web applications into a single web service, connecting O’Reilly & Associates’ Meerkat technology database and a custom XML-RPC discussion server.

Chapter 6, explains how to make XML-RPC calls using the Python scripting language. It also describes how to set up a standalone XML-RPC server.

Chapter 7, demonstrates how to build XML-RPC listeners and clients using the ASP library written in VBScript.

Chapter 8, puts XML-RPC in a bigger context.

Appendix A, and Appendix B, provide a reference to these supporting technologies.

Conventions Used in This Book

The following font conventions are used in this book:

Italic is used for:

  • Pathnames, filenames, and program names

  • Internet addresses used as examples and newsgroups

  • New terms where they are defined

Constant Width is used for:

  • Command lines and options that should be typed verbatim

  • Names and keywords in programs, including method names, variable names, and class names

  • XML element tags

Constant-Width Bold is used for emphasis in program code lines.

Constant-Width Italic is used for replaceable arguments within program code.

Using Code Examples

This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Programming Web Services with XML-RPC, by Simon St.Laurent, Joe Johnston & Edd Dumbill. Copyright 2001 O’Reilly & Associates, Inc., ISBN 978-0-5960-0119-3.

If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at permissions@oreilly.com.

How to Contact Us

We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made mistakes!). Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:

O’Reilly & Associates, Inc.
101 Morris Street
Sebastopol, CA 95472
1-800-998-9938 (in the U.S. or Canada)
1-707-829-0515 (international/local)
1-707-829-0104 (fax)

You can also send us messages electronically. To be put on the mailing list or request a catalog, send email to:

To ask technical questions or comment on the book, send email to:

We have a web site for the book, where we’ll list examples, errata, and any plans for future editions. You can access this page at:

http://www.oreilly.com/catalog/progxmlrpc/

For more information about this book and others, see the O’Reilly web site:

http://www.oreilly.com

Acknowledgments

All of the authors would like to thank Dave Winer for nurturing XML-RPC and believing in its capabilities.We’d also like to thank John Posner for his contributions to this book and the entire O’Reilly tools and production crew for helping to get this book out so quickly.

Simon St.Laurent’s Acknowledgements

I would like to thank John Osborn for believing in this project at the outset and for finding us the support we needed.Val Quercia and Paula Ferguson have improved the project substantially with their comments.Edd Dumbill helped get this project rolling, and his experience as an implementor of the specification was invaluable.Joe Johnston and John Posner helped us through the jungle of diverse implementations, and Joe’s assistance with many of the chapters has strengthened them.I’d like to thank the XMLhack editors for their continuing support and the xml-dev mailing list for continuing to explore new and exciting applications for markup.Most of all, I’d like to thank my wife Tracey for keeping me going.

Joe Johnston’s Acknowledgments

Deceivingly, only three names are listed on the cover, but this book is the result of many people working together to make it a reality. O’Reilly editor John Osborn is directly responsible for bringing me into this project. Although John left the project early on, he shouldn’t be allowed to escape the culpability of his actions without a proper reckoning. The inheritor of this project, Valerie Quercia, maintained her grace and sense of humor despite being brought in on short notice to tame the wild manuscripts of physically (and mentally) remote authors. Another eleventh-hour hero is veteran O’Reilly editor Paula Ferguson, who deftly separated the content wheat from the fatuous chaff. It has been my privilege to work with Simon St.Laurent, whose quiet but firm leadership navigated this project through its often wild and turbulent course. Thanks are also due to Edd Dumbill and John Posner for bringing their technical expertise to this effort. Greg Wilson’s comments on the Python chapter were both insightful and instructive.

I would not be a technical writer today without the encouragement, support, and friendship of O’Reilly’s Jon Orwant. For many hours of proofreading and syntactic bravado, Caroline Senay has my gratitude. If anyone deserves to see some payoff from my writing, it’s my family, who have tolerated me beyond any reasonable person’s expectation. To the regulars of the IRC channel #perl, this kick’s for you. Thank you all.

Edd Dumbill’s Acknowledgments

I would like to thank the contributors to XMLhack, who constantly provide encouragement and a new perspective on the XML world; Ken MacLeod and Bijan Parsia for their criticism and debate; the members of the PHP XML-RPC mailing list; and my wife Rachael, whose support, as usual, makes my work possible.

Get Programming Web Services with XML-RPC 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.