[development] module with XML RPC

Leo Burd leob at media.mit.edu
Fri Sep 1 00:50:10 UTC 2006


Hello Andrew,

I've been using XML RPC a lot in my work.  I'm implementing a bunch of 
modules to provide telephone access to Drupal websites (voicemail, audio 
announcements, audio groups, etc.) and I use XML-RPC to handle all the 
communication between the telephone/voip server and the Drupal site.  You 
can have a look at a sample module that handles the upload/download/query of 
audio nodes here: http://drupal.org/node/43110

If you are interested, please get in touch with me outside the list and I'll 
send you the PHP .inc file that makes the XML-RPC calls to the above 
mentioned module.

Good luck,

Leo

----- Original Message ----- 
From: "andrew morton" <graveltech at gmail.com>
To: <development at drupal.org>
Sent: Thursday, August 31, 2006 4:21 PM
Subject: Re: [development] module with XML RPC


> 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