Bug #894

XMLRPC::Server "system.listMethods" handler fails in Ruby 1.9.1-preview2

Added by Hal Brodigan about 3 years ago. Updated 10 months ago.

[ruby-core:20604]
Status:Closed Start date:12/17/2008
Priority:High Due date:
Assignee:- % Done:

100%

Category:lib
Target version:1.9.1 Release Candidate
ruby -v:

Description

When trying to call "system.listMethods" with an example XMLRPC::Server, I noticed that a XMLRPC::FaultException would always be raised.

#
# Server
#
require 'xmlrpc/server'

class TestObject

  def test
    "this is a test"
  end

end

server = XMLRPC::Server.new
server.add_introspection
server.add_handler('obj', TestObject.new)
server.serve

#
# Client
#
require 'xmlrpc/client'

client = XMLRPC::Client.new2('http://localhost:8080')
client.call('obj.test')
# => "this is a test"
client.call('system.listMethods')
XMLRPC::FaultException: XMLRPC::FaultException
	from /usr/local/lib/ruby19/1.9.1/xmlrpc/client.rb:414:in `call'
	from (irb):10
	from /usr/local/bin/irb19:12:in `<main>'

Although, "system.listMethods" does work when no handlers are added. Tested with Ruby 1.9.1-preview2.

Associated revisions

Revision 20854
Added by James Gray about 3 years ago

* lib/xmlrpc/server.rb: Restricting method inspection to show only non-inherited public methods. [ruby-core:20603] * lib/xmlrpc/server.rb: Fixing method inspection so it doesn't trigger XMLRPC::FaultException when used. [ruby-core:20604]

History

Updated by Yuki Sonoda about 3 years ago

  • Category set to lib
  • Target version set to 1.9.1 Release Candidate

Updated by James Gray about 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
Applied in changeset r20854.

Also available in: Atom PDF