I'm trying to do a multiple requests xmlrpc with a single call.

This is the code:

$url = variable_get('lesson_client_URL', '');
$series = xmlrpc($url,'series.load', (int)$tid); //Returns an array of nodes ids (nid)
	
foreach ($series as $serie) {
	  $calls[] = array($url,'node.load', $serie['nid'], array());
	}
	
$result = xmlrpc($url, $calls);

This is the error:

[faultCode] => -32601
[faultString] => Server error. Requested method system.multicall not specified.

I was wondering if anyone out there has a working example code.

Thanks.

Comments

greenskin’s picture

subscribe

designerbrent’s picture

subscribe

ainigma32’s picture

Status: Active » Fixed

Tried running this in a block on 5.12 and 6.6 and it seems to works ok:

//XMLRPC multicall example

$url = 'http://phpxmlrpc.sourceforge.net/server.php';
$calls = array();

$calls[] = array('methodName' => 'system.getCapabilities',
                       'params' => array()
                    );

$calls[] = array('methodName' => 'system.listMethods',
                       'params' => array()
                     );

$calls[] = array('methodName' => 'examples.stringecho',
                       'params' => array('Tadaa!') );



$res = xmlrpc($url,'system.multicall', $calls); 

echo '<pre>';
print_r($caps);
echo  '</pre>';

- Arie

greenskin’s picture

Ahh, that's what we were doing wrong. The second param needs to be 'system.multicall', we were passing the array of calls as the second param. Thanks.

greenskin’s picture

Status: Fixed » Active

I get the error 'Method system.multicall does not exist' when trying to make multicall using Drupal's xmlrpc.

greenskin’s picture

Project: Drupal core » Services
Version: 6.2 » 6.x-1.x-dev
Component: other » Code
Category: support » bug

This is an issue with the Services xmlrpc server module. Changing the Project to Services.

snelson’s picture

Assigned: Unassigned » marcingy
Status: Active » Postponed (maintainer needs more info)

greenSkin, Services uses Drupal's xmlrpc server. It just provides methods to Drupal xmlrpc through hook_xmlrpc. This is why you can access services methods through Drupal's /xmlrpc.php. So, I'm thinking this is an issue with Drupal's xmlrpc, but will refer to marcingy for more ...

Marc is this even possible with Drupal xmlrpc? I'm thinking not ... so Drupal xmlrpc issue?

snelson’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This is a duplicate of #255516: XMLRPC multiple requests.