Hi All,
I want to test my client code to connect to the yahoo server using XML-RPC.
Below is my Client code to connect to Flicker service implemented in yahoo using
API "flickr.groups.search".
----------------------------------------------------------------------
require "xmlrpc/client"
# Make an object to represent the XML-RPC server.
server = XMLRPC::Client.new2( "http://api.flickr.com/services/api/")
# Call the remote server and get our result
result =
server.call("flickr.groups.search","f9163a092be90899ca376899dd5b92a8","api","5")\
.inspect
if result
puts 'Hey, it worked!'
else
puts 'Back to the drawing board...'
end
puts result
----------------------------------------------------------------------
I could not able to connet to server and throwing error like:
F:\srikanth-smruti\testlinkapi>ruby client.rb
c:/ruby/lib/ruby/1.8/net/http.rb:560:in `initialize': getaddrinfo: no address as
sociated with hostname. (SocketError)
from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `open'
from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
from c:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
from c:/ruby/lib/ruby/1.8/net/http.rb:553:in `do_start'
from c:/ruby/lib/ruby/1.8/net/http.rb:542:in `start'
from c:/ruby/lib/ruby/1.8/net/http.rb:1032:in `request'
from c:/ruby/lib/ruby/1.8/net/http.rb:989:in `post2'
from c:/ruby/lib/ruby/1.8/xmlrpc/client.rb:535:in `do_rpc'
from c:/ruby/lib/ruby/1.8/xmlrpc/client.rb:420:in `call2'
from c:/ruby/lib/ruby/1.8/xmlrpc/client.rb:410:in `call'
from client.rb:7
can any one suggest is there any problem in my code?
And help me out from this probelm.
thanks
Srikanth