Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

WDSL/SOAP API ERROR
 
rolo550
Jr. Member
 
Total Posts:  6
Joined:  2013-03-18
 

If I browse to my WSDL,, it shows up fine, but if I try to run

<?php

$client = new SoapClient(\\\'http://localhost/store/soap/api/?wsdl\\\');
$session = $client->login(\\\'apiuser\\\', \\\'apikey\\\');

?>

(yes my user and pass, for now, is apiuser and apikey.)

I disable WS-I compliance, as mentioned:

http://www.magentocommerce.com/knowledge-base/entry/wsi-compliance/

Add Store Code to Urls is no

Auto-redirect to Base URL is no…

I get

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://localhost/store/soap/api/?wsdl’ : failed to load external entity “http://localhost/store/soap/api/?wsdl” in D:\apps\xampp\htdocs\practice\MagentoQueryPractice.php:12 Stack trace: #0 D:\apps\xampp\htdocs\practice\MagentoQueryPractice.php(12): SoapClient->SoapClient(’http://localhos...’) #1 {main} thrown in D:\apps\xampp\htdocs\practice\MagentoQueryPractice.php on line 12

Anyone have any suggestions?  All the Forum answers I have read dont help.

I\\\’m running on a test environment XAMPP

XAMPP
1.8.1
[PHP: 5.4.7]

 
Magento Community Magento Community
Magento Community
Magento Community
 
rolo550
Jr. Member
 
Total Posts:  6
Joined:  2013-03-18
 

must not have liked localhost,

This works

<?php
$client = new SoapClient('http://127.0.0.1/store/api/soap/?wsdl');

$session = $client->login('apiuser', 'apikey');

$result = $client->call($session, 'catalog_product.list');
var_dump($result);
?>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top