usage

The purpose of this package is to let users have human-readable documentation automatically generated for all xmlrpc methods that are implemented by a given xmlrpc server.

The documentation produced will be in HTML format, and it will exactly match the information that the xmlrpc_server class makes available to clients via usage of the system.methodHelp, system.methodSignature and system.listMethods xmlrpc calls. As an extra feature, documentation for single parameters of xmlrpc methods can be added. Html forms will be included with every method synopsis description page, to help the developer do quick'n'dirty debugging.

The simplest way to make usage of the extra capabilities of this package is to take an existing xmlrpc_server and swap the php class used with documenting_xmlrpc_server:


<?php // define the dispatch map describing all of the xmlrpc methods exposed by this server and the php functions that implement them
$dmap = array(
  
'' => array(),
  ...
);

// include the php code implementing the xmlrpc methods
...

// build the server and let it do its job: that's it!
$server = new documenting_xmlrpc_server($dmap);

Since version 0.4, the html forms that are generated by the server class can take advantage of the javascript-based visual xmlrpc value editor that is part of the jsxmlrpc library (downloadable as a separate package from the sourceforge.net project pages), making it even easier to invoke the implemented webservices via a browser interface. This optional feature can be enabled by setting the editorpath member of the server:


<?php $s = new documenting_xmlrpc_server($dmapfalse);
$s->editorpath '../javascript/'// enable link to js visual editor of content: set this to the directory where it is located
$s->setdebug(3); // enable maximum debugging level, just in case
$s->service();