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

Setting up web services (soap)
 
jellyfishit
Jr. Member
 
Total Posts:  2
Joined:  2009-02-01
 

I have been trying to get my web services working but I am not having any luck.

I have tried the scripts in the documentation:
http://www.magentocommerce.com/wiki/doc/webservices-api/introduction

This is my code lifted from the example above

$proxy = new SoapClient('http://mydomain/magento/index.php/api/soap/index/wsdl/1');
$sessionId $proxy->login(’apiUser’‘apiKey’); 
$allCusts$proxy->call($sessionId‘customer.list’);
var_dump($allCusts);

My url to the wsdl file above works in the browser but not via the original examples below:

http://mydomain/api/?wsdl or http://mydomain/api/soap/?wsdl

I also followed the instructions of the post below and setup the webservices users and roles:
http://www.magentocommerce.com/boards/viewthread/24991/

But I’m still getting error messages, I have been through just about all the forum posts relating to this and cannot find the answers.

The error message I’m getting is:

Warning: SoapClient::SoapClient(http://mydomain/magento/index.php/api/soap/index/wsdl/1) [soapclient.soapclient]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /opt/lampp/htdocs/magento/soaptest.php on line 3

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity “http://mydomain/magento/index.php/api/soap/index/wsdl/1” in /opt/lampp/htdocs/magento/soaptest.php on line 3

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://mydomain/magento/index.php/api/soap/index/wsdl/1’ in /opt/lampp/htdocs/magento/soaptest.php:3 Stack trace: #0 /opt/lampp/htdocs/magento/soaptest.php(3): SoapClient->SoapClient(’http://mydomain’) #1 {main} thrown in /opt/lampp/htdocs/magento/soaptest.php on line 3

I’m wondering if it may be something to do with permissions but I’m guessing, any help at all would appreciated…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jellyfishit
Jr. Member
 
Total Posts:  2
Joined:  2009-02-01
 

Oh by the way I using a LAMP environment, with PHP 5.3 and version 1.1.8 of Magento

 
Magento Community Magento Community
Magento Community
Magento Community
 
Damian Culotta
Enthusiast
 
Total Posts:  878
Joined:  2008-12-10
Argentina
 

It looks a little bit strange that url (http://mydomain/magento/index.php/api/soap/index/wsdl/1)

What happens if you try with:  http://mydomain/magento/index.php/api/?wsdl

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiran.ghai
Jr. Member
 
Total Posts:  2
Joined:  2009-07-31
 

Hi there,

I am also getting the same error. Did you find any solution for this??

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