当我在 magento root 中运行以下代码时
<?php
$client = new SoapClient('http://localhost/mymagento/index.php/api/v2_soap/index?wsdl=1', array('cache_wsdl' => WSDL_CACHE_NONE));
$session = $client->login('testuser', 'testuser');
$result = $client->salesOrderList($session);
echo"<pre>";
print_r($result);
echo"</pre>";
?>
我收到以下错误
Fatal error: Uncaught SoapFault exception: [4] Resource path is not callable. in /var/www/html/mymagento/sales_order.php:9
Stack trace:
#0 /var/www/html/mymagento/sales_order.php(9): SoapClient->__call('salesOrderList', Array)
#1 /var/www/html/mymagento/sales_order.php(9): SoapClient->salesOrderList('98850601ed8aa6f...')
#2 {main}
thrown in /var/www/html/mymagento/sales_order.php on line 9
但是当我运行时
$result = $client->salesOrderInfo($session,'100000030');
没有出现错误。
如何解决这个问题? 请帮忙
最佳答案
这意味着您正在尝试访问应在的地方不可用的资源。例如类文件。
在我的项目中,我收到此错误,一个目录不在正确的位置。请检查您为覆盖核心文件而创建的目录结构。或者检查core files的目录结构是否被错误地打乱。
关于Magento Api错误 fatal error : Uncaught SoapFault exception: [4] Resource path is not callable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19950958/