I'm trying to access magento product catalog data using magento API.
I'm trying sample code provided by magento
$client = new SoapClient('http://magentohost/api/soap/?wsdl'); // If somestuff requires api authentification, // then get a session token $session = $client->login('apiUser', 'apiKey'); $result = $client->call($session, 'catalog_product.list'); var_dump($result); // If you don't need the session anymore //$client->endSession($session);
All the API(s) are working fine expect the catalog product list.
I'm getting following error.
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getRole() on null in G:\wamp64\www\mage-api\index.php on line 11 ( ! ) SoapFault: Call to a member function getRole() on null in G:\wamp64\www\mage-api\index.php on line 11
I have created API user with full access role and it's working fine with all the API expect catalog list.
Any solution ? Thanks in advance.