Magento API calls for product information

I used the code below to get product information from magento store from my localhost

$proxy = new SoapClient('http://domain.com/magento/index.php/api/soap/?wsdl');

$sessionId = $proxy->login('username', 'apikey');
$filters = array(
    'sku' => array('like'=>'test%')
);

$products = $proxy->call($sessionId, 'product.list', array($filters));

var_dump($products);

It works on my localhost machine, but not on the server. But soap configuration is enabled on the server. Below is the error message

" SOAP-ERROR: WSDL analysis: could not find <definition> in "

I received the corresponding xml file when I used the URL http: //domainname/shoponline/index.php/api/soap/? Wsdl below

I deleted index.php but did not get any result.

$proxy = new SoapClient('http://domain.com/magento/index.php/api/soap/?wsdl');

The above expression shows the following error

Parsing WSDL: Couldn't find definitions in
+3
source share
4 answers

, XML WSDL . , . , , ( , ), ( HTTP-). URL- http://domain.com/magento/index.php/api/soap/?wsdl http://user:pass@domain.com/magento/index.php/api/soap/?wsdl

+2

, index.php.

+2

"hosts" C:\windows\system32\drivers\etc ::1 (: # ::1) , .

- http://localhost:81/magento/index.php/api/soap/?wsdl, .

0

SoapClient wsdl, , . , , . api/[type] .htaccess, # api.php. api.php, api.php, , API .

, SOAP - http://domain.com/magento/api.php?type=soap&wsdl. "soap_v2".

0

All Articles