[development] module with XML RPC
andrew morton
graveltech at gmail.com
Thu Aug 31 20:21:20 UTC 2006
On 8/31/06, Augustin (Beginner) <drupal.beginner at wechange.org> wrote:
> How come the Drupal XML RPC API doesn't use any of the PHP XML RPC functions
> defined here: http://php.net/xmlrpc ?
> Is this a completely different implementation?
> Why?
> Is there a historical/technical reason behind this?
Well it's an extension and we can't depend on it being installed on
most servers. That and the warning on the PHP site says it all: "This
extension is EXPERIMENTAL. The behaviour of this extension --
including the names of its functions and anything else documented
about this extension -- may change without notice in a future release
of PHP. Use this extension at your own risk."
> How does a XML RPC "session" happen?
As far as I know it's state-less, if you want sessions you'll need to
write those.
> I.e., if I have a drupal XML RPC client module, that needs to contact a remote
> XML RPC server, do I get a chance to send the call, get the reply and process
> that reply all within one page load, as if it were a SQL query?
Yes, it's just a function call.
> What modules exist that use XML RPC a lot, that I could study?
>
> How would a simple code snippet look like? (make a call to server, get reply,
> and have a if / else fork according to the reply we got - or display /
> print_r() the content of the reply).
I've done a bit with XML RPC in the station module. The archive and
schedule sub-modules are desinged to run on different machines and
grab program information remotely. The code is sort of scattered
around but it's a working example.
andrew
More information about the development
mailing list