You are here

Example: XML-RPC in Examples for Developers 7

Same name and namespace in other branches
  1. 6 xmlrpc_example/xmlrpc_example.module \xmlrpc_example

Demonstration of XML-RPC in Drupal 7.

This is an example of how to implement and XML-RPC server by registering callbacks to specific methods and how to make xmlrpc calls using the built-in xmlrpc() factory provided by Drupal.

For experimentation you may be interested in the XML-RPC Tester module.

Note that the Services module is another common way to do XML-RPC at this time.

See also

hook_xmlrpc()

xmlrpc()

xmlrpc_errno()

xmlrpc_error_msg()

Parent topics

File

xmlrpc_example/xmlrpc_example.module, line 8
Module file for xmlrpc_example module.

Functions

Namesort descending Location Description
xmlrpc_example_alter_form xmlrpc_example/xmlrpc_example.module Present a form to enable/disable the code implemented in hook_xmlrpc_alter.
xmlrpc_example_client_add_submit xmlrpc_example/xmlrpc_example.module Submit handler to query xmlrpc_example.add.
xmlrpc_example_client_form xmlrpc_example/xmlrpc_example.module Returns a form array to take input for two arguments.
xmlrpc_example_client_multicall_submit xmlrpc_example/xmlrpc_example.module Submit a multicall request.
xmlrpc_example_client_request_methods_submit xmlrpc_example/xmlrpc_example.module Submit handler to query system.listMethods.
xmlrpc_example_client_subtract_submit xmlrpc_example/xmlrpc_example.module Submit handler to query xmlrpc_example.subtract.
xmlrpc_example_info xmlrpc_example/xmlrpc_example.module A simple landing-page information function.
xmlrpc_example_menu xmlrpc_example/xmlrpc_example.module Implements hook_menu().
xmlrpc_example_server_form xmlrpc_example/xmlrpc_example.module Returns form array to configure the service options.
xmlrpc_example_xmlrpc xmlrpc_example/xmlrpc_example.module Implements hook_xmlrpc().
xmlrpc_example_xmlrpc_alter xmlrpc_example/xmlrpc_example.module Implements hook_xmlrpc_alter().
_xmlrpc_example_alter_add xmlrpc_example/xmlrpc_example.module Sum the two arguments without limit checking.
_xmlrpc_example_alter_subtract xmlrpc_example/xmlrpc_example.module Return the difference of the two arguments without limit checking.
_xmlrpc_example_server_add xmlrpc_example/xmlrpc_example.module This is the callback for the xmlrpc_example.add method.
_xmlrpc_example_server_subtract xmlrpc_example/xmlrpc_example.module This is the callback for the xmlrpc_example.subtract xmlrpc method.

Classes

Namesort descending Location Description
XmlrpcExampleTestCase xmlrpc_example/xmlrpc_example.test Functional tests for the XMLRPC Example module.