From: Pankaj Kumar Date: 2006-09-02T17:11:51+09:00 Subject: Re: why is XML-RPC client prog not running?? Hi! guys, below are client as well as server code...(i've simply copied the programs from the web site"http://www.tldp.org/HOWTO/XML-RPC-HOWTO/xmlrpc-howto-ruby.html"). i've already installed xmlrpc4r-1_7_16 as`well as xmlparser-0.6.8 in my computer...please see why they are not running?? *************************************** #client side prog(ruby_c.rb) require "xmlrpc/client" # Make an object to represent the XML−RPC server. server = XMLRPC::Client.new( "127.0.0.1", "/cgi-bin/ruby_s.rb",80) # Call the remote server and get our result result = server.call("sample.sumAndDifference", 5, 3) sum = result["sum"] difference = result["difference"] puts "Sum: #{sum}, Difference: #{difference}" ************************************ #server side prog(ruby_s.rb) require "xmlrpc/server" s = XMLRPC::CGIServer.new s.add_hanlder("sample.sumAndDifference") do |a,b| { "sum" => a + b, "difference" => a - b } end s.serve ************************************* Phil Tomson wrote: > On 9/1/06, Pankaj Kumar wrote: >> from ruby_c.rb:9 >> where is the problem? >> > > can you post your code? > Also, you say you're using Apache as the server (or I'm assuming that > from the fact that you mention that the ruby server program is stored > in the cgi-bin directory of apache server). Perhaps you should try to > get it working with the webrick server built-in to Ruby's XML-RPC > first and then move to apache - that way you can eliminate apace setup > problems as the possible culprit. > > Phil -- Posted via http://www.ruby-forum.com/.