Re: gSOAP and ActionWebService interop problems

I am experiencing a similar problem, not with gSOAP, but with
Apache’s SOAP library. Just like Guido, XML-RPC works perfectly, but
the SOAP request processing fails during protocol discovery. Rail’s
SOAP client also works perfectly, so I’m fairly certain the error is
not in my code.

I am new to both ActionWebService and the Ruby XMLRPC module, so I’m
not quite sure what is supposed to be going on in
Protocol::Discovery::InstanceMethods#discover_web_service_request.
However, it seems that it expects
Protocol::XmlRpc::XmlRpcProtocol#decode_action_pack_request to return
nil in the case that the request is SOAP rather than throwing the “No
valid method call” exception (see below).

As a quick test, I wrapped the decode_action_pack_request call in a
rescue block, only to get the second exception listed below.

Any help would be appreciated. I plan to use XML-RPC until I have
more time to investigate the issue (sorry Guido!).

Take care,
Matt

Version info (running on Mac OS X, ruby 1.8.2) :

actionwebservice (1.1.2, 0.8.1, 0.8.0, 0.7.1)
Web service support for Action Pack.

rails (1.1.2, 0.13.1, 0.13.0, 0.12.1)
Web-application framework with template engine, control-flow layer,
and ORM.

Inspecting discovery.rb shows that things fall over when decoding the

          return request unless request.nil?

embedded system and can’t run Java, a scripting language or anything
that’s not C. Eric Kidds XML-RPC library seems a little too
heavyweight due to its reliance on libwww. I’d appreciate some help.

– G.

RuntimeError (No valid method call - missing method name!):
/usr/lib/ruby/1.8/xmlrpc/parser.rb:478:in parseMethodCall' /usr/lib/ruby/1.8/xmlrpc/marshal.rb:63:inload_call’
/usr/lib/ruby/1.8/xmlrpc/marshal.rb:32:in load_call' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/ action_web_service/protocol/xmlrpc_protocol.rb:36:indecode_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/protocol/xmlrpc_protocol.rb:32:in
decode_action_pack_request' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/ action_web_service/protocol/discovery.rb:21:indiscover_web_service_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/protocol/discovery.rb:18:in each' /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/ action_web_service/protocol/discovery.rb:18:indiscover_web_service_request’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/dispatcher/action_controller_dispatcher.rb:44:in
dispatch_web_service_request' (eval):1:inapi’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/base.rb:910:in send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/base.rb:910:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/filters.rb:368:in perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/benchmarking.rb:69:in measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/rescue.rb:82:in perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/base.rb:381:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/base.rb:381:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/filters.rb:377:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/session_management.rb:117:in process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:
115:in handle_dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb: 81:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
/usr/lib/ruby/1.8/webrick/server.rb:155:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:144:instart’
/usr/lib/ruby/1.8/webrick/server.rb:144:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:94:instart’
/usr/lib/ruby/1.8/webrick/server.rb:89:in each' /usr/lib/ruby/1.8/webrick/server.rb:89:instart’
/usr/lib/ruby/1.8/webrick/server.rb:79:in start' /usr/lib/ruby/1.8/webrick/server.rb:79:instart’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:
67:in `dispatch’
script/server:49

NoMethodError (You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.collect):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/rescue.rb:136:in clean_backtrace' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/rescue.rb:44:inlog_error’
/usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/
action_web_service/dispatcher/action_controller_dispatcher.rb:67:in
dispatch_web_service_request' (eval):1:inapi’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/base.rb:910:in send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/base.rb:910:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/filters.rb:368:in perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/benchmarking.rb:69:in measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/rescue.rb:82:in perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/base.rb:381:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/base.rb:381:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/filters.rb:377:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/
action_controller/session_management.rb:117:in process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:indispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:
115:in handle_dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb: 81:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
/usr/lib/ruby/1.8/webrick/server.rb:155:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:144:instart’
/usr/lib/ruby/1.8/webrick/server.rb:144:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:94:instart’
/usr/lib/ruby/1.8/webrick/server.rb:89:in each' /usr/lib/ruby/1.8/webrick/server.rb:89:instart’
/usr/lib/ruby/1.8/webrick/server.rb:79:in start' /usr/lib/ruby/1.8/webrick/server.rb:79:instart’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:
67:in `dispatch’
script/server:49