Re-namespacing a bit to clear out some fairly old stuff from the top level
This commit is contained in:
12
oldstuff/RubyFun/cookbook/016/03.rb
Normal file
12
oldstuff/RubyFun/cookbook/016/03.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user