Android-Magento- How to Get the Details of Multiple Products in Android using XML-RPC

Viewed 2699

How to get the details of Multiple products in a Single Call in Android using XMLRPC from Magento.I am able to get the list of products using the function catalog_product.list using XMLRPC.

Now, i have the SKU id's of all the products.I am able to get the media details of each product using the function product_media.list.

If suppose I have 10 products,i have to call 10 times product_media.list method for each product which takes long time.

So,how can I call the multiCall function of Magento in Android. Many tutorials in php for calling the multiCall function are posted but I am not able to imitate the same in Android.

So please help me if you have similar code snippet that can make me understand multiCall function(for Android) so that I can Advance further using that.
Thanks.


PHP code Example from Josua Marcel C 's Answer:


$session = $client->call('login', array('apiUser', 'apiKey'));
$client->call('call', array($session,'somestuff.method', array('arg1', 'arg2', 'arg3')));  
$client->call('call', array($session, 'somestuff.method', 'arg1'));   
$client->call('call', array($session, 'somestuff.method'));

$client->call('multiCall', 
               array($session,
                  array(
                      array('somestuff.method', 'arg1'),
                      array('somestuff.method', array('arg1', 'arg2')),
                      array('somestuff.method')
                   )
              )
            );  

I would like to imitate the above php code in Android that calls the multiCall() function of the Magento.


3 Answers
Related