I’m calling Magento 1.5.1.0 API with http://**/api/soap/?wsdl (version 1)
I can login to the webservice, I can get customer.info, customer_address.info etc.
But I can’t get customer_address.list to work.
I’m using the following code:
$proxy = new SoapClient('http://***/api/soap/?wsdl');
$sessionId = $proxy->login('apiuser', 'apipass');
$newCustomerId = 178475;
// This works fine
var_dump($proxy->call($sessionId, 'customer.info', $newCustomerId));
// This should work according to the API doc. But doesn't?
var_dump($proxy->call($sessionId, 'customer_address.list', $newCustomerId));
The error message in the second var_dump is:
Call to a member function getId() on a non-object
Any ideas on what could be wrong?
Regards,
Lars Hansen
It may be you have a custom module that got an/some error for getId() function.
My example is working.
Or it might be your $newCustomerId is not exists on your customer_entity table;
Do try for debugging the error.
Correct me if i’m wrong
^^