Probably the main issue is that in your curl command you have double quotes (") embedded in double quotes, which is transformed by your (Linux) shell to something completely different. When I tried, changing the outer double-quotes (") to single quotes (') the error 5 disappeared.
The following command:
curl -X POST -k -H "Content-type: text/xml" -d 'xml=<aruba command="user_query"> <ipaddr>192.168.33.130</ipaddr> <key>secret123</key> <authentication>cleartext</authentication> <version>1.0</version> </aruba>' https://instant.nl.arubalab.com/auth/command.xml
Produces the following output on my IAP:
<?xml version='1.0'?>
<aruba>
<status>Ok</status>
<code>0</code>
<macaddr>f4:1b:a1:07:ff:aa</macaddr>
<ipaddr>192.168.33.130</ipaddr>
<name>IPad-01</name>
<role>kindle</role>
<type>wireless</type>
<vlan>1</vlan>
<location>192.168.33.132</location>
<age>5m:27s</age>
<auth_status>unauthenticated</auth_status>
<auth_method>wpa2-psk-aes</auth_method>
<auth_server>N/A</auth_server>
<essid>kindle</essid>
<bssid>d8:c7:c8:44:55:52</bssid>
<phy_type>AN</phy_type>
<in_packets>0</in_packets>
<in_octets>0</in_octets>
<out_packets>0</out_packets>
<out_octets>0</out_octets>
</aruba>
Where I got the required fields from the XML-API documentation available at: http://www.arubanetworks.com/techdocs/ArubaOS_60/UserGuide/XML_API.php
And on the Instant I had my XML client configured with a key:
xml-api-server
ip 192.168.32.20
key secret123
which can be found for the WebUI addicts in Instant -> More -> Services -> Network Integration.
Other commands will probably work as well, if you start from this working example.
Herman