Hi,
After following the excellent tutorials in the Agile Web D.
with Rails book, I was able to get my webservice working pretty much
perfectly
I can access it via SOAP and XML-RPC and look at service.wsdl to find
the API. What I can’t do however is get the API for the XML-RPC call. It
fails with :
Internal protocol error: NilClass is not a valid input stream. It must
be
either a String, IO, StringIO or Source.
Backtrace:
/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in stream=' /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:100:in
initialize’
/usr/lib/ruby/1.8/rexml/parsers/streamparser.rb:6:in initialize' /usr/lib/ruby/1.8/rexml/document.rb:173:in
parse_stream’
/usr/lib/ruby/1.8/xmlrpc/parser.rb:717:in parse' /usr/lib/ruby/1.8/xmlrpc/parser.rb:475: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:20: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
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
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/1.8/benchmark.rb:293: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
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/mongrel-0.3.12.4/lib/mongrel/rails.rb:66:in
process' /usr/lib/ruby/1.8/thread.rb:135:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:64:in
process' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:425:in
process_client’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:424:in
process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:495:in
run’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:494:in run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:483:in
run’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:774:in run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel.rb:772:in
run’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:97:in
run' /usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/command.rb:163:in
run’
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel_rails:194
/usr/bin/mongrel_rails:18
I’ve tested it with Webrick as well and I get the same error. I’ve tried
googling for it but I haven’t come across anything too useful. I’m
wondering if there is a well known reason for this to happen when
everything else seems to be fine…
Anyway, as always, any help you can give me will be gratefully
appreciated
Cheers,
Pete