Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
API - How do I get started? 
 
itzik
Jr. Member
 
Total Posts:  28
Joined:  2008-07-21
 

I’m a little unsure of how to get started with API....could someone please advise? I created a PHP file and put in this code:

<?

  $proxy 
= new SoapClient('http://mydomain.com/api/?wsdl');
  
$sessionId $proxy->login('apiUser''apiKey');
  
  
var_dump($proxy->call($sessionId'product.info''InvOf_78'));

?>

but then I got this error:

Fatal errorUncaught SoapFault exception[WSDL] SOAP-ERRORParsing WSDLCouldn't load from 'http://mydomain.com/api/soap/?wsdl' in /home/liquncom/public_html/custom/soap.php:3 Stack trace: #0 /home/liquncom/public_html/custom/soap.php(3): SoapClient->SoapClient('http://liquidat...') #1 {main} thrown in /home/liquncom/public_html/custom/soap.php on line 3

 
Magento Community Magento Community
Magento Community
Magento Community
 
clorne
Sr. Member
 
Total Posts:  149
Joined:  2008-01-10
London
 

To begin with you should be using Magento 1.1.1

1.  Make sure that extension=php_soap.dll is enabled in php.ini
2. You may have to include index.php in your url “ http://mydomain.com/index.php/api/?wsdl’
3. Create BOTH a role and user in your admin System/Web Services

Good luck

 
Magento Community Magento Community
Magento Community
Magento Community
 
itzik
Jr. Member
 
Total Posts:  28
Joined:  2008-07-21
 

Does that mean API does not work in Magento ver. 1.0.19870 ?

and if so, is there any way to update the API functionality without updating the entire script?

 
Magento Community Magento Community
Magento Community
Magento Community
 
novalis
Sr. Member
 
Avatar
Total Posts:  247
Joined:  2007-10-13
Berlin, Germany
 

Are you running PHP as CGI? There’s a duplicate header error which is hidden because Magento loads the wsdl internal. For the fixed function see my blogpost about this issue:

http://www.exanto.de/duplicate-headers-bei-magento-113.html

Or the issue itself with the “old” fix… you should use the one from my blogpost.

http://www.magentocommerce.com/bug-tracking/issue/?issue=1257

Greetz,
Nov

 Signature 

http://www.exanto.de | Magento-DE auf Freenode | Kein Support per PM, ICQ oder E-Mail, bitte nutzt das Forum!

 
Magento Community Magento Community
Magento Community
Magento Community
 
adultcart
Jr. Member
 
Total Posts:  4
Joined:  2009-02-01
 

I still can’t get it to work :(

Can anyone help?

http://mariasfantasy.com/SCRIPT/magento.api.php

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
196260 users|1007 users currently online|367013 forum posts