Error when Testing AWS API (ArgumentError: illegal refid htt

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 W.


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

On 12/31/05, John W. [email protected] wrote:

ArgumentError: illegal refid http://test.host/login

Ugh. 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. :smiley:

In my defence, the error message isn’t exactly informative.


Regards,
John W.


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