0a9428093c
git-subtree-dir: RubyFun git-subtree-mainline:a04a502787
git-subtree-split:b01c682613
13 lines
273 B
Ruby
13 lines
273 B
Ruby
require 'xmlrpc/client'
|
|
|
|
server = XMLRPC::Client.new2('http://betty.userland.com/RPC2')
|
|
puts server.call('examples.getStateName', 5)
|
|
|
|
|
|
begin
|
|
server.call('noSuchMethod')
|
|
rescue XMLRPC::FaultException => e
|
|
puts "Error: fault code #{e.faultCode}"
|
|
puts e.faultString
|
|
end
|