Ruby has standard class for XML-RPC called XMLRPC::Client – you can find the documentation at http://www.ruby-doc.org/stdlib/libdoc/xmlrpc/rdoc/classes/XMLRPC/Client.html.
require "xmlrpc/client"
AuthInfo = Struct.new( "AuthInfo", :login, :password )
ServerAddress = Struct.new( "ServerAddress", :ips, :macs )
CreationParameters = Struct.new( "CreationParameters", :hwid )
server = XMLRPC::Client.new2( 'https://ka.parallels.com:7050/', nil, 900 )
begin
puts 'Performing Call'
result = server.call( "partner10.createKey",
AuthInfo.new( "API_USER", "API_PASSWORD" ),
ServerAddress.new( [ "192.168.62.80" ], [] ),
'ka-client',
'VIRTUOZZO_2X3X',
['2CPU_40VPS'],
CreationParameters.new('2111.4355.5697.53D9.C5B3.766A.843A.1984' ),
[ 'VIRTUOZZO_TOOLS_FOR_LINUX' ],
CreationParameters.new( '2111.4355.5697.53D9.C5B3.766A.843A.1984' ))
puts "Contents:"
result.each { | key, value | puts "#{key}: #{value}" }
rescue XMLRPC::FaultException => e
puts "Error:"
puts e.faultCode
puts e.faultString
end