process errors that come back from RPC calls with call2 : xmlrpc « Network « Ruby






process errors that come back from RPC calls with call2


require 'xmlrpc/client'

server = XMLRPC::Client.new2("http://xmlrpc-c.sourceforge.net/api/sample.php")
ok, results = server.call2("sample.sumAndDifference", 5, 3)

if ok
  puts results.inspect
else
  puts results.faultCode
  puts results.faultString
end

 








Related examples in the same category

1.Writing XML-RPC Clients
2.XMLRPC call
3.XMLRPC client
4.Writing XML-RPC Servers
5.Dumping and Loading XML-RPC Messages
6.Calling a method made available over XML-RPC
7.Making an XML-RPC-Enabled Program