Example: XML-RPC in Examples for Developers 6
Same name and namespace in other branches
- 7 xmlrpc_example/xmlrpc_example.module \xmlrpc_example
XML-RPC client/server. (drupal 6)
This is an example of how to implement an XML-RPC server by registering callbacks to specific methods and how to make xmlrpc calls using the builtin xmlrpc() factory provided by Drupal.
For experimentation you may be interested in the XMLRPC Tester module.
Note that the Services module is probably the more common way to do XMLRPC at this time.
See also
xmlrpc()
Parent topics
File
- xmlrpc_example/
xmlrpc_example.module, line 20 - This is an example of how to implement an XML-RPC server by registering callbacks to specific methods and how to make xmlrpc calls using the builtin xmlrpc() factory provided by Drupal.
Functions
Name | Location | Description |
---|---|---|
xmlrpc_example_client_add_submit |
xmlrpc_example/ |
Submit: query the xmlrpc endpoint for the method xmlrpc_example.add and report the result. |
xmlrpc_example_client_form |
xmlrpc_example/ |
Present a form that makes use of xmlrpc services to add or subtract. |
xmlrpc_example_client_subtract_submit |
xmlrpc_example/ |
Submit for subtraction: Call the xmlrpc method and report the result. |
xmlrpc_example_menu |
xmlrpc_example/ |
Implementation of hook_menu(). Register all the demonstration forms. |
xmlrpc_example_server_form |
xmlrpc_example/ |
Present a form to configure the xmlrpc service options. In this case the max and min values for any of the operations (add or subtraction). |
xmlrpc_example_xmlrpc |
xmlrpc_example/ |
Implements hook_xmlrpc(). |
_xmlrpc_example_server_add |
xmlrpc_example/ |
Sum the two arguments. |
_xmlrpc_example_server_subtract |
xmlrpc_example/ |
Return the difference of the two arguments. |