user884352
user884352

Reputation:

XML parsing with Zend's xmlrpc Client

I am trying to retrieve from an xml file which holds list of the hotel bookings, using zend library called xmlrpc. This is the code:

$client = new Zend_XmlRpc_Client('http://username:[email protected]/xml-rpc');
$service = $client->getProxy();
$hotels = $service->bookings->getHotels();

How can I pass some parameters to the getHotels method?

Upvotes: 1

Views: 995

Answers (1)

user884352
user884352

Reputation:

I have done it! Just pass the parameters in an associative array like this:

$client = new Zend_XmlRpc_Client('http://username:[email protected]/xml-rpc');
$content = array(
    'paramname' => array(paramvalues)
 );
 $service = $client->getProxy(); 
 $hotels=$service->bookings->getHotels($content);

;)

Upvotes: 1

Related Questions