John Wilger
2005-Dec-31 06:46 UTC
[Rails] Error when Testing AWS API (ArgumentError: illegal refid http://test.host/login)
OK, I''m finally starting to play around with the AWS part of Rails, and I''m running into problems with the functional tests. If I use the generator to create the web service as ./script/generate web_sevice MyTest do_it and then run the unit tests without further editing the code, I get the following error: test_do_it(MyTestControllerApiTest): ArgumentError: illegal refid http://test.host/login /usr/local/ruby/lib/ruby/1.8/soap/baseData.rb:166:in `decode'' /usr/local/ruby/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:153:in `decode_tag'' /usr/local/ruby/lib/ruby/1.8/soap/parser.rb:179:in `decode_tag'' /usr/local/ruby/lib/ruby/1.8/soap/parser.rb:130:in `start_element'' /usr/local/ruby/lib/ruby/1.8/xsd/xmlparser/parser.rb:67:in `start_element'' /usr/local/ruby/lib/ruby/1.8/xsd/xmlparser/rexmlparser.rb:34:in `tag_start'' /usr/local/ruby/lib/ruby/1.8/rexml/parsers/streamparser.rb:24:in `parse'' /usr/local/ruby/lib/ruby/1.8/rexml/document.rb:173:in `parse_stream'' /usr/local/ruby/lib/ruby/1.8/xsd/xmlparser/rexmlparser.rb:27:in `do_parse'' /usr/local/ruby/lib/ruby/1.8/soap/parser.rb:92:in `parse'' /usr/local/ruby/lib/ruby/1.8/soap/processor.rb:39:in `unmarshal'' /usr/local/ruby/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/protocol/soap_protocol.rb:84:in `decode_response'' /usr/local/ruby/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/test_invoke.rb:59:in `decode_rpc_response'' /usr/local/ruby/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/test_invoke.rb:11:in `invoke'' ./test/functional/my_test_api_test.rb:14:in `test_do_it'' I''m using Ruby 1.8.4 compiled form source on Linux and the Rails 1.0.0 gems. I''ve been searching for info on the problem for the last couple of hours and haven''t turned up anything, so if someone could point me in the right direction (or confirm that it''s a bug and that I''m not just going nuts), it would be much appreciated. Also, the web service itself seems to work just fine when I test it by hand using the web service scaffolding on the controller. -- Regards, John Wilger http://johnwilger.com ----------- Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don''t know," Alice answered. "Then," said the cat, "it doesn''t matter." - Lewis Carrol, Alice in Wonderland
John Wilger
2005-Dec-31 16:51 UTC
[Rails] Re: Error when Testing AWS API (ArgumentError: illegal refid http://test.host/login)
On 12/31/05, John Wilger <johnwilger@gmail.com> wrote:> OK, I''m finally starting to play around with the AWS part of Rails, > and I''m running into problems with the functional tests. If I use the > generator to create the web service as > > ./script/generate web_sevice MyTest do_it > > and then run the unit tests without further editing the code, I get > the following error: > > test_do_it(MyTestControllerApiTest): > ArgumentError: illegal refid http://test.host/loginUgh. I''m an idiot. Guess I was just staring at it too long and too late at night. I''m getting the error because an application-wide before_filter is redirecting the request to a login page. :-D In my defence, the error message isn''t exactly informative. -- Regards, John Wilger http://johnwilger.com ----------- Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don''t know," Alice answered. "Then," said the cat, "it doesn''t matter." - Lewis Carrol, Alice in Wonderland
Reasonably Related Threads
- Strange error when testing layered web service
- soap4r 1.5.5 seems to break actionWebService tests
- Error with Web Service tests after upgrading to Rails 1.1.2
- Web Services testing... Agile Book p. 435
- Testing webservices in Integration Tests with Jamis Buck's recipe?