문제

I have to use magento webservice to get data remotely from my server(ubuntu 10.04), so i have followed this tuto : http://magento4u.wordpress.com/2009/07/28/magento-api-web-service-work/,

but when I try to execute the method in code igniter Controller :

$proxy = new SoapClient('myhostname/soap/?wsdl');

$sessionId = $proxy->login('username', '***********');

$customerinfo = $proxy->customerCustomerInfo($sessionId,1);

print_r($customerinfo);

I get this error :

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://hostname.com/api/soap/?wsdl' : Entity 'copy' not defined in /var/www/happyprojects/api/application/controllers/users.php:42 Stack trace: #0 /var/www/happyprojects/api/application/controllers/users.php(42): SoapClient->SoapClient('myhostname', Array) #1 [internal function]: Users->magento_call_get() #2 /var/www/happyprojects/api/system/core/CodeIgniter.php(359): call_user_func_array(Array, Array) #3 /var/www/happyprojects/api/index.php(219): require_once('/var/www/happyp...') #4 {main} thrown in /var/www/happyprojects/api/application/controllers/users.php on line 42

Please can you help really I'm blocked, I don't know what to do.

도움이 되었습니까?

해결책

The problem was solved, I had to add just ´www´ to my URL call and this solve the problem, I hope this may help you later.

다른 팁

$client = new SoapClient('myhostname/index.php/api/soap/?wsdl');

Add index.php in your SoapClient variable.

Yes, Adding index.php in your SoapClient variable will resolve the error

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top