XML-RPC HOWTO

Eric Kidd

Source Builders

eric.kidd@pobox.com

And Other Contributors

Describes how to use XML-RPC to implement clients and servers in a variety of languages. Provides example code in Perl, Python, C, C++, Java, PHP and other languages. Includes sections on Zope and KDE 2.0. Applies to all operating systems with XML-RPC support.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

This manual contains short example programs ("the Software"). Permission is hereby granted, free of charge, to any person obtaining a copy of the Software, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following condition:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Table of Contents
1. What is XML-RPC?
How it Works
Supported Data Types
The History of XML-RPC
2. XML-RPC vs. Other Protocols
XML-RPC vs. CORBA
XML-RPC vs. DCOM
XML-RPC vs. SOAP
3. Common XML-RPC Interfaces
Introspection: Discovering Server APIs
Boxcarring: Sending Multiple Requests at Once
4. A Sample API: sumAndDifference
5. Using XML-RPC with Perl
A Perl Client
A Stand-Alone Perl Server
A CGI-Based Perl Server
6. Using XML-RPC with Python
A Python Client
7. Using XML-RPC with C and C++
A C Client
A C++ Client
A C++ Client with Proxy Classes
A CGI-Based C Server
8. Using XML-RPC with Java
A Java Client
A Stand-Alone Java Server
9. Using XML-RPC with PHP
A PHP Client
A PHP Server
10. Using XML-RPC with Microsoft .NET
11. Using XML-RPC with Ruby
A Ruby Client
A Ruby Server
12. Using XML-RPC with Proprietary Languages
Using XML-RPC with K
13. Applications with Built-in XML-RPC Support
Zope
KDE 2.0
14. About This Document
New Versions of This Document
Contributors to the XML-RPC HOWTO
Submitting Other Snippets