XML RPC Interface

The XML RPC (eXtensible Markup Language - Remote Procedure Call) Interface is a robust system that allows you to access the functionality of Magento through a standardized interface.  There are many actions you can perform through XML RPC, such as Order Inquiries, Ship Notifications, Insert or Poll product information and more.

Tutorial

1. Setting Up a Magento XML RPC User

The first thing you need to do in order to use XML RPC on your Magento installation is to create a Web Services User and give that User a Role.  Start by setting up a role for the user using the instructions below.

  1. Log in to the admin area of your Magento web site
  2. Select “System” –> “Web Services” –> “Roles” from the menu
  3. Click the “Add New Role” button
  4. Give the role a Name so you’ll know what it’s for
  5. Under Role Resources, set the permissions you’d like to give to your XML RPC service
  6. Click “Save Roll”

Now create the User…

  1. Log in to Magento’s Admin area
  2. Select “System” –> “Web Services” –> “Users” from the menu
  3. Click the “Add A New User” button
  4. Enter the required information
  5. Be sure to make the password very STRONG.
  6. Under the “User Role” tab, select the Role you just created
  7. Click “Save User”

You now have a Web Services User, and that User has a Role.  You can move on to connecting to the server remotely.

2. Connecting to your Magento Server via XML RPC

Now you’re ready to make a connection from a remote server.  If your remote server is running PHP 5.0.1 and has the SOAP classes built in, you’re in luck.  It’s as easy as running the code I have below.  If not, you can use the SOAP Pear package, although that’s not covered in this tutorial, and therefore the code below would not apply.

To be continued…

References:
Magento XML RPC definitions

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Twitter

Leave a Reply