Why is XML-RPC client prog not running?

Hi!all
when i run ruby client program(which simply adds& subtracts two numbers
by making XML-RPC call to ruby server program stored in cgi-bin
directory of apache server), it's giving following error
/usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:502:in `do_rpc':
HTTP-Error: 500 Internal Server Error (RuntimeError)
        from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:382:in
`call2'
        from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:372:in
`call'
        from ruby_c.rb:9
where is the problem?

···

--
Posted via http://www.ruby-forum.com/.

On the server. For a longer answer you need elaborate more.

···

On 9/1/06, Pankaj Kumar <pankajkumar144@rediffmail.com> wrote:

Hi!all
when i run ruby client program(which simply adds& subtracts two numbers
by making XML-RPC call to ruby server program stored in cgi-bin
directory of apache server), it's giving following error
/usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:502:in `do_rpc':
HTTP-Error: 500 Internal Server Error (RuntimeError)
        from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:382:in
`call2'
        from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:372:in
`call'
        from ruby_c.rb:9
where is the problem?

--
Kent
---

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

···

On 9/1/06, Pankaj Kumar <pankajkumar144@rediffmail.com> wrote:

Hi!all
when i run ruby client program(which simply adds& subtracts two numbers
by making XML-RPC call to ruby server program stored in cgi-bin
directory of apache server), it's giving following error
/usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:502:in `do_rpc':
HTTP-Error: 500 Internal Server Error (RuntimeError)
       from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:382:in
`call2'
       from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:372:in
`call'
       from ruby_c.rb:9
where is the problem?

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&quot;\).
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 <pankajkumar144@rediffmail.com> 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/\.

Pankaj Kumar wrote:

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&quot;\).

This howto seems to contain a spelling mistake, that you copied as well:

************************************
#server side prog(ruby_s.rb)

require "xmlrpc/server"

s = XMLRPC::CGIServer.new

s.add_hanlder("sample.sumAndDifference") do |a,b|

s.add_handler(...

  { "sum" => a + b, "difference" => a - b }
end

s.serve

You should try to find the place where your http server writes its logfile to and observe it, in order to find out what the exact cause of server errors is.

···

--
Florian Frank