XMLRPC call : xmlrpc « Network « Ruby






XMLRPC call


require "xmlrpc/client"

client = XMLRPC::Client.new2('http://www.ruby-lang.org/~nahi/xmlrpc/raa/')

list = info = nil

t1 = Thread.new {
  list = client.call_async("raa.getAllListings")
}

t2 = Thread.new {
  ok, param = client.call2_asnyc("raa.getInfoFromName", "XML-RPC")
  info = param if ok
}

# wait for the threads to complete
t1.join; t2.join

p list, info

 








Related examples in the same category

1.Writing XML-RPC Clients
2.XMLRPC client
3.Writing XML-RPC Servers
4.Dumping and Loading XML-RPC Messages
5.Calling a method made available over XML-RPC
6.process errors that come back from RPC calls with call2
7.Making an XML-RPC-Enabled Program