0

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.

3

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"
| improve this answer | |
  • I tried this url also but not working. – Manoj Kumar Oct 18 '13 at 12:48
  • have u created your own module for api?? or extended the functionality?? – MagentoBoy Oct 18 '13 at 12:56
  • my own module api. v1 & v2 versions all methods are working except v1:update method. – Manoj Kumar Oct 18 '13 at 12:57
  • magento core is having default module is as named "Api and SoapController is controller name. If you have created your own module then use localhost/ics/index.php/<urModuleName>/…> – MagentoBoy Oct 18 '13 at 13:02
  • is compulsory or optional? Am not create any controller for api. in model file creating methods and registering the wsdl.xml,api.xml and wsi.xml. all methods are working except v1:update method – Manoj Kumar Oct 18 '13 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.