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.
- Log in to the admin area of your Magento web site
- Select “System” –> “Web Services” –> “Roles” from the menu
- Click the “Add New Role” button
- Give the role a Name so you’ll know what it’s for
- Under Role Resources, set the permissions you’d like to give to your XML RPC service
- Click “Save Roll”
Now create the User…
- Log in to Magento’s Admin area
- Select “System” –> “Web Services” –> “Users” from the menu
- Click the “Add A New User” button
- Enter the required information
- Be sure to make the password very STRONG.
- Under the “User Role” tab, select the Role you just created
- 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
