Error trying to use Magento API SOAP 1.9

Asked

Viewed 21 times

0

I’m trying to consume Magento’s SOAP API through the examples shown in documentation of the People themselves, but I’m getting the following error:

Fatal error: Uncaught Soapfault Exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from 'http://magestore.local/api/soap/? wsdl=1' in /var/www/magestore.local/api/test.php on line 15

My script:

<?php

ini_set('soap.wsdl_cache_enabled', '0');
ini_set('soap.wsdl_cache', '0');

$store_url = 'http://magestore.local';
$wsdl_url = $store_url . '/api/soap/?wsdl=1';
$apiUser = 'user-test';
$apiKey = 'test123';

echo "<p>WSDL URL: {$wsdl_url}</p>";

$proxy = new SoapClient($wsdl_url);

$sessionId = $proxy->login($apiUser, $apiKey);

var_dump($sessionId);

Can anyone tell me where I’m going wrong?

And if you have any tutorial that can help me in my learning, I will be very grateful!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.