xml-rpc request using curl?

Viewed 17940

I have a Magento server that has various methods exposed through the API. I am prototyping various client-side modules to call this API. This has been successful so far.

I just started using curl to push xml through. Surprisingly, I'm unable even to get past the API login. Here's what I am doing (the 'login' method takes two strings, the username and password).

curl --data-urlencode @xmlrpc http://domain/api/xmlrpc

contents of file xmlrpc

<?xml version="1.0"?>
 <methodCall> 
 <methodName>login</methodName>
 <params>
 <param>
 <value>apiUser</value>
 </param>
 <param>
 <value>apiKey</value>
 </param>
 </params>
 </methodCall>

This is what I get:

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>631</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Failed to parse request</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>

what does that error mean?

1 Answers
Related