Writing an XML-RPC Client : XML RPC « Network « Ruby






Writing an XML-RPC Client


require 'xmlrpc/client'
server = XMLRPC::Client.new2('http://yourURL')
server.call('yourmethod', 5)      

begin
  server.call('noSuchMethod')
rescue XMLRPC::FaultException => e
  puts "Error: fault code #{e.faultCode}"
  puts e.faultString
end

 








Related examples in the same category

1.Call a web service