ActionWebService: XMLRPC Server Multicall possible?

Hi all,
I have a question concerning ActionWebService XMLRPC servers: Is it
possible to send multicall requests to the Web service? I tried to
use multicall and get the error message:
no such method ‘system.multicall’ on API [MyAPI]

In Changeset 2021 there is the following commit message:
add ‘system.multicall’ support to XML-RPC. boxcarred methods must
still exist
on the target service(s), value casting will still be performed, and
recursive
‘system.multicall’ calls are not allowed.

Any hints what I can do to enable multicalls in my Rails application?

best regards,
Holger

Thank you very much for your help.

irb(main):001:0> require ‘xmlrpc/client’
=> true

irb(main):002:0> server = XMLRPC::Client.new2(‘http://localhost:3000/
my/api’)
=> #<XMLRPC::Client:0x59a2e0 @user=nil, @proxy_port=nil, @auth=nil,
@cookie=nil, @create=nil, @port=3000, @http=#<Net::HTTP localhost:
3000 open=false>, @proxy_host=nil, @http_last_response=nil,
@parser=nil, @timeout=30, @path=“/my/api”, @password=nil,
@http_header_extra=nil, @use_ssl=false, @host=“localhost”>

irb(main):004:0> result = server.multicall([‘UniverseGetBuildings’,
‘de’, ‘666’],[‘UniverseGetDefense’, ‘de’, ‘666’])
XMLRPC::FaultException: XMLRPC::FaultException
from /usr/local/lib/ruby/1.8/xmlrpc/client.rb:447:in
`multicall’
from (irb):4

irb(main):005:0> result2 = server.multicall2([‘Function1’, 'param1,
‘param2’],[‘Function2’, ‘param1’, ‘param2’])
=> [false, #<XMLRPC::FaultException: XMLRPC::FaultException>]

irb(main):009:0> result2[1].to_h
=> {“faultCode”=>2, “faultString”=>“no such method ‘system.multicall’
on API MyApi”}

multicall should be enabled by default. Show me how you call it, please.

On 8/16/06, Holger B. [email protected] wrote:

recursive


Kent

Can you check log files at the server side? Are there any exceptions
logged?

On 8/17/06, Holger B. [email protected] wrote:

@parser=nil, @timeout=30, @path=“/my/api”, @password=nil,
‘param2’],[‘Function2’, ‘param1’, ‘param2’])

multicall should be enabled by default. Show me how you call it,

add ‘system.multicall’ support to XML-RPC. boxcarred methods must
Rails mailing list
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Kent

On 8/17/06, Holger B. [email protected] wrote:

An excerpt from my development.log the server.log file is empty in
my application’s log dir I hope tha helps. Or do you mean an other
log file?

Hm, strange. How do you register your api with a controller? What
web_service_dispatching_mode are you using?


Kent

In my app/apis/ directory I have got a file called oms_api.rb where
the api is defined.
web_service_dispatching_mode is default ( I did not change it). So I
think direct dispatching is used.
All functions who should be usable by oms webservice are listed in
the api file.
In app/controllers/oms_controller.rb all the functions of the web
service are defined.

I have
wsdl_service_name ‘Oms’
web_service_api OmsApi
in my oms_controller.

Do I have to specify the system.multicall function in my oms api?

Holger

An excerpt from my development.log the server.log file is empty in
my application’s log dir I hope tha helps. Or do you mean an other
log file?

Parameters: {"<?xml version"=>"“1.0” ?

system.multicall</
methodName>methodNameUniverseGetDefense</
value>params</
name>de</
value>666</
member>methodName</
name>UniverseGetBuildings</
member>params</
name>de</
value>666</
member></
methodCall>\n", “action”=>“api”, “controller”=>“oms”}

Web Service Request: system.multicall
([{“methodName”=>“UniverseGetDefense”, “params”=>[“de”, “666”]},
{“methodName”=>“UniverseGetBuildings”, “params”=>[“de”, “666”]}])
Entrypoint: api
ler"=>“oms”}

Web Service Request: system.multicall
([{“methodName”=>“UniverseGetDefense”, “params”=>[“de”, “666”]},
{“methodName”=>“UniverseGetBuildings”, “params”=>[“de”, “666”]}])
Entrypoint: api

<?xml version="1.0" ?>system.multicall</

methodName>methodNameUniverseGetDefense</
value>params</
name>de</
value>666</
member>methodName</
name>UniverseGetBuildings</
member>params</
name>de</
value>666</
member></
methodCall>

ActionWebService::Dispatcher::DispatcherError (no such method
‘system.multicall’ on API OmsApi):
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/dispatcher/abstract.rb:152:in
web_service_invocation' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/ action_web_service/dispatcher/abstract.rb:18:ininvoke_web_service_request’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/dispatcher/action_controller_dispatcher.rb:53:in
dispatch_web_service_request' /usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/dispatcher/action_controller_dispatcher.rb:51:in
dispatch_web_service_request' (eval):1:inapi’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/base.rb:910:in perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/filters.rb:368:inperform_action_without_benchmark’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/benchmarking.rb:69:in perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/benchmarking.rb:69:in perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/rescue.rb:82:inperform_action’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/base.rb:381:in process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/filters.rb:377:inprocess_without_session_management_support’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/session_management.rb:117:in process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb: 38:indispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/
fcgi_handler.rb:150:in process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/ fcgi_handler.rb:54:inprocess!’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in each_cgi' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/
fcgi_handler.rb:53:in process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/ fcgi_handler.rb:23:inprocess!’
/Users/holger/Projects/oms/public/dispatch.fcgi:24

Web Service Response: => #<XMLRPC::FaultException:
XMLRPC::FaultException>

<?xml version="1.0" ? >faultCode2faultStringno such method 'system.multicall' on API OmsApi Sending data Completed in 0.00648 (154 reqs/sec) | Rendering: 0.00005 (0%) | DB: 0.00000 (0%) | 200 OK [http://localhost/oms/api]