|
Hi guys,
With the new API that came with 1.1, I am starting to sketch a few needs that can be (in theory) finnaly accomplished. However, I have ran into the simple problem of getting the system starting so that I can start programming with the API.
I have followed Pixeldreamz’s Tutorial but the error: “==> Error: Invalid api path.” always appear. I am using XAMPP in Windows, and running Magento 1.1 Beta.
My code test.php
<?php
$host= 'localhost/magento11b'; $client= new SoapClient('http://'.$host.'/index.php/api/soap/?wsdl');
// Can be added in Magento-Admin -> Web Services $apiuser= "user"; $apikey = "pass";
try { $sess_id= $client->login($apiuser, $apikey); $result= $client->call($sess_id, ‘catalog_category.tree’, array()); } catch (Exception $e) { echo "==> Error: ".$e->getMessage(); exit(); }
foreach ($result['children'] as $child) { echo "–> ".$child['name']." (id:".$child['category_id'].")\n"; } ?>
Info on phpinfo();
soap Soap Client enabled Soap Server enabled
Directive Local Value Master Value soap.wsdl_cache 1 1 soap.wsdl_cache_dir C:\xampp\tmp C:\xampp\tmp soap.wsdl_cache_enabled 1 1 soap.wsdl_cache_limit 5 5 soap.wsdl_cache_ttl 86400 86400
Do anyone have a clue of what is going on and how can I surpass this itching problem? Thanks a lot in advance.
|