php - Soap Product List Output - Magento -


i have tried using magento api documentation via soap times output product list, whole thing looks this: (http://www.magentocommerce.com/api/soap/introduction.html)

<?php //include magento api file - replace server path file require_once('/absolut-dirl/app/mage.php');  /***** configuration ******/ $myapilogin = 'login'; $myapikey = 'key';   // begin soap requests $client = new soapclient('https://shop-url.com/index.php/api/soap/?wsdl'); $session = $client->login($myapilogin, $myapikey);  //get database products array $products = $client->call($session, 'catalog_product.list');  echo "starting product loop...<br/><br/>"; var_dump($products); ?> 

however, null result. doing wrong? fast help, appreciate it.

greetings roley

// sorry bad english.

its may problem login credential. use try catch block , check.

try {     $proxy  = new soapclient($magento_webserver."api/soap/?wsdl");     $sessionid  = $proxy->login($magento_webservices_username,  $magento_webservices_passwd);     echo "soap login complete! <br/>";     echo "======================== <br/>"; } catch (soapfault $fault) {     die("\n\n soap fault: (fault code: {$fault->faultcode},     fault string: {$fault->faultstring}) <br/>"); } 

Comments