Forum: Ruby on Rails Re: gSOAP and ActionWebService interop problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matt Walker (Guest)
on 2006-04-26 20:00
(Received via mailing list)
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:in `load_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:in `decode_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:in
`discover_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:in
`discover_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:in `api'
     /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:in `perform_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:in `perform_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:in `perform_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:in `send'
     /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:in
`process_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:in
`dispatch'
     /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:in `service'
     /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
     /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
     /usr/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
     /usr/lib/ruby/1.8/webrick/server.rb:144:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
     /usr/lib/ruby/1.8/webrick/server.rb:94:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'
     /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
     /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:in `log_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:in `api'
     /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:in `perform_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:in `perform_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:in `perform_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:in `send'
     /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:in
`process_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:in
`dispatch'
     /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:in `service'
     /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
     /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
     /usr/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
     /usr/lib/ruby/1.8/webrick/server.rb:144:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
     /usr/lib/ruby/1.8/webrick/server.rb:94:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'
     /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
     /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
     /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:
67:in `dispatch'
     script/server:49
This topic is locked and can not be replied to.