Example: XML-RPC in Examples for Developers 7
Same name and namespace in other branches
- 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
xmlrpc()
Parent topics
File
- xmlrpc_example/
xmlrpc_example.module, line 8 - Module file for xmlrpc_example module.
Functions
Name | Location | Description |
---|---|---|
xmlrpc_example_alter_form |
xmlrpc_example/ |
Present a form to enable/disable the code implemented in hook_xmlrpc_alter. |
xmlrpc_example_client_add_submit |
xmlrpc_example/ |
Submit handler to query xmlrpc_example.add. |
xmlrpc_example_client_form |
xmlrpc_example/ |
Returns a form array to take input for two arguments. |
xmlrpc_example_client_multicall_submit |
xmlrpc_example/ |
Submit a multicall request. |
xmlrpc_example_client_request_methods_submit |
xmlrpc_example/ |
Submit handler to query system.listMethods. |
xmlrpc_example_client_subtract_submit |
xmlrpc_example/ |
Submit handler to query xmlrpc_example.subtract. |
xmlrpc_example_info |
xmlrpc_example/ |
A simple landing-page information function. |
xmlrpc_example_menu |
xmlrpc_example/ |
Implements hook_menu(). |
xmlrpc_example_server_form |
xmlrpc_example/ |
Returns form array to configure the service options. |
xmlrpc_example_xmlrpc |
xmlrpc_example/ |
Implements hook_xmlrpc(). |
xmlrpc_example_xmlrpc_alter |
xmlrpc_example/ |
Implements hook_xmlrpc_alter(). |
_xmlrpc_example_alter_add |
xmlrpc_example/ |
Sum the two arguments without limit checking. |
_xmlrpc_example_alter_subtract |
xmlrpc_example/ |
Return the difference of the two arguments without limit checking. |
_xmlrpc_example_server_add |
xmlrpc_example/ |
This is the callback for the xmlrpc_example.add method. |
_xmlrpc_example_server_subtract |
xmlrpc_example/ |
This is the callback for the xmlrpc_example.subtract xmlrpc method. |
Classes
Name | Location | Description |
---|---|---|
XmlrpcExampleTestCase |
xmlrpc_example/ |
Functional tests for the XMLRPC Example module. |