4

I am applying for an account at godatafeed.com, and they say that my site does not have xml-rpc enabled. I checked all settings but I cant find anything regarding this.

I checked some websites and they say to try to browse to this urls"

http://www.theprinterdepo.com/index.php/api/xmlrpc/ http://www.theprinterdepo.com/index.php/api/?wsdl

the 2nd one works, the first one doesnt show anything.

how can I enable this service?

Luis Valencia
  • 32,619
  • 93
  • 286
  • 506

3 Answers3

6

The first one is likely not working because somebody (perhaps yourself) has applied the workaround fix to the xmlrpc security vulnerability.

You can find more information on the vulnerability here.

Peter O'Callaghan
  • 6,181
  • 3
  • 26
  • 27
  • omg, I remember I did something like this, once I read that link you supplied I inmediately remembered that. Damn, so if I uncomment it again then I will have the vulnerability again – Luis Valencia Sep 04 '12 at 13:35
  • Well, it depends on your version of Magento. On the link provided it gives patches for the newer versions, that allow you to fix the vulnerability rather than remove the functionality. – Peter O'Callaghan Sep 04 '12 at 13:39
  • How can I install the .patch file? it looks it has more than one file in there – Luis Valencia Sep 04 '12 at 14:09
  • please let me know how can I Instal the .patch file – Luis Valencia Sep 04 '12 at 14:19
  • If you want to install the xmlrpc patch go to the root of you magento install, change to the lib/Zend/XmlRpc directory. Then issue the following command 'patch < [your-patch-file]' That's it. – ahillman3 Sep 04 '12 at 14:43
5

Here are the steps I followed to make it work:

  1. Install Magento 1.1 (minimum)

  2. In the admin, under System -> Web Services, add one user, add one role (specify the access level for the role, or check “All"), and assign the user to the role

  3. Using a XML RPC client (a good one for Mac OS X: http://ditchnet.org/xmlrpc/), set the endpoint URL to http://yourstore/magento/api/xmlrpc/

  4. First call the method “login”, with 2 parameters: the user and the key (you just created them at step 2.). Refer to the screenshot in attachement.

  5. The request looks like this:

    <methodCall> <methodName> login
    </methodName> <params> <param> <value> <string> test
    </string> </value> </param> <param> <value> <string> 123456
    </string> </value> </param> </params> </methodCall>

  6. The respons looks like this (it contains your session id):

    <methodResponse> <params> <param> <value> <string> a10915086ca235bcf71f66cfe70bd198
    </string> </value> </param> </params> </methodResponse>

  7. Using the session id you are now able to call any other method. For example catalog_category.tree. So you just always call the method “call” and pass the 2 parameters: session id, method name (refer to screenshots in attachement). You may have other parameters to pass depending on the target method.

enter image description here enter image description here enter image description here

See the below URL:-

http://www.magentocommerce.com/boards/viewthread/11773/

Abid Hussain
  • 7,724
  • 3
  • 35
  • 53
  • see also http://www.magentocommerce.com/wiki/5_-modules_and_development/0_-_module_development_in_magento/introduction http://www.magentocommerce.com/api/soap/introduction.html – Abid Hussain Aug 30 '12 at 11:19
  • is there a client for windows. the other guy ahillman3 already tried creating a php script and he says he gets an error: unable to parse response. – Luis Valencia Aug 30 '12 at 11:45
  • see this url http://www.magentocommerce.com/wiki/5_-modules_and_development/0_-_module_development_in_magento/introduction – Abid Hussain Aug 30 '12 at 12:00
  • change the url like this `http://localhost/magento/index.php`/api/xmlrpc/ `http://localhost/magento/index.php/api/?wsdl` Yeah, thanks that works!! So I suggest the Magento team update their doc to reflect that URL change. Thank you again. So yeah, we’ll hopefully irmprove our connector module very soon. – Abid Hussain Aug 30 '12 at 14:13
  • above the last comment see this url http://www.magentocommerce.com/boards/viewthread/11773/ – Abid Hussain Aug 30 '12 at 14:15
  • Just as an FYI, using the URLs suggested within the XML-RPC client, no response is ever received from the server. – ahillman3 Aug 30 '12 at 20:16
  • I'm having a similar problem. I can call methods via the call method, but only ones that don't have parameters. How do you call a method with parameters as a parameter to the call method? – Jake Rankin Dec 06 '18 at 00:28
3

I played around with this a while back, and ended up turning it off due to requirements changing, but...

To answer your question about where it is in the admin interface, go to System->Web Services->Users, and add a user as godatafeed.com requires, this will include user name, first name, last name, email, api key, api key confirmation, and whether this account is active.

You may need to create a specific role for that user as well... System->Web Services->Roles, this will give the user assigned to the role, specific permissions in the subsystems of Magento as desired/needed.

If you need additional, info you can look at the magentocommerce forums, I found this one when I was implementing it previously. The info is old, but is updated and useful as you go through the thread: http://www.magentocommerce.com/boards/viewthread/11773/

The URLs you have appear to be correct, but if the user doesn't exist, it won't let anything happen. Double check your URLs with the info in the forum as well, they have samples to test the API.

From comment below, explanation of API v1 and v2 with php examples of both: http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/introduction

While all of the information presented is useful, we were unable to resolve the poster's issue.

ahillman3
  • 976
  • 7
  • 18
  • the role exists, it has permission for catalog, product data. the user exist as well and its associated to the role, the only thing I see is that api key and key confirmation are empty on the user. – Luis Valencia Aug 24 '12 at 20:33
  • is there anyway I can test this? check this post, they have some screenshots of some kind of tool but its for mac. http://www.magentocommerce.com/boards/viewthread/11773/#t44122 – Luis Valencia Aug 24 '12 at 20:44
  • API Key and API Key confirmation are required. It definitely will not work with them missing. – ahillman3 Aug 24 '12 at 20:58
  • You should also get some sort of message going directly to the URLs you originally posted. – ahillman3 Aug 24 '12 at 20:59
  • I updated the api and confirmation, I get nothing, blank page. – Luis Valencia Aug 24 '12 at 21:04
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/15785/discussion-between-luisevalencia-and-ahillman3) – Luis Valencia Aug 24 '12 at 21:18
  • are you available so we can check again and chat?, my skype is: le.valencia if u can help me – Luis Valencia Aug 25 '12 at 18:30