Magento – Invalid api path

apimagento-1.6php-5.4phpstormsoap

I have created v1 & v2 API successfully and invoking
the all methods to fallow the Marius & Sylvain instructions.

v1 & v2 all methods are successfully running except v1: update method.

v1:
1)update ->Invalid api path Error?

can any one tell me where I went wrong?

my code is:

<?php 
//$proxy = new SoapClient('http://IPAddress/ics/index.php/api/soap?wsdl'); //edit the address and put the url to your magento here
$proxy = new SoapClient('http://localhost/ics/index.php/api/?wsdl');
try
{

$sessionId = $proxy->login("magento","magento@123");


$result = $proxy->call($sessionId,'mca.mcaMcaUpdate',array('1',array('firstname'=>'Manoj','lastname'=>'Kumar','telephone'=>'97012365478')));

print_r($result); 


$proxy->endSession($sessionId);
} catch (Exception $e) {
    echo '<h1>Error</h1>';
    echo '<p>' . $e->getMessage() . '</p>';
}

thanks in advance.

Best Answer

Please check the url once ... your url is

"http://localhost/ics/index.php/api/?wsdl" 

but it should be

 "http://localhost/ics/index.php/api/soap/?wsdl"
Related Topic