Hi All,
I am migrating a working RoR app from Ruby 1.8.2 with Rails 1.0 to Ruby
1.8.4 and Rails 1.1.6. In the application I post XML such as:
In 1.0 of Rails this worked fine but in 1.1.6 it now has the following
in the Parameter line of the development log:
Parameters: {“format”=>#<Mime::Type:0x2b662f8
@string=“application/xml”, @synonyms=[“text/xml”, “application/x-xml”],
@symbol=:xml>, “exception”=>“can’t typecast
"http://services.stuff.com/profile/request\” (RuntimeError)“,
“action”=>“profile”, “controller”=>“xml”, “raw_post_data”=>”<profile
xmlns="http://services.stuff.com/profile/request\“>\n\t<username>user1</username>\n\t<password>pwd1</password>\n</profile>”,
“backtrace”=>[“D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:111:in
typecast_xml_value'", "D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:99:in
typecast_xml_value’”,
“D:/ruby184/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
inject'", "D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:98:in
typecast_xml_value’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:99:in
typecast_xml_value'", "D:/ruby184/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
inject’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:98:in
typecast_xml_value'", "D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/cgi_methods.rb:71:in
parse_formatted_request_parameters’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_process.rb:69:in
request_parameters'", "D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/request.rb:13:in
parameters’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:122:in
set_session_options_without_components'", "D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/components.rb:178:in
set_session_options’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:116:in
process'", "D:/ruby184/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
dispatch’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in
process_request'", "D:/ruby184/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in
process!'”, “D:/ruby184/lib/ruby/site_ruby/1.8/fcgi.rb:598:in
each_cgi'", "D:/ruby184/lib/ruby/site_ruby/1.8/fcgi.rb:595:in
each_cgi’”,
“D:/ruby184/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in
process!'", "D:/ruby184/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in
process!'”,
“D:/eclipse3.2/eclipse/workspace/LCP-New/public/dispatch.fcgi:24”]}
When I remove the xmlns from the xml then no error is thrown. Is this
a known limitation with rails 1.1.6 that it doesn’t support xmlns? Is
there something I am doing which is causing this problem? Is there a
way to have the xml work the exact same way between 1.0 and 1.1 of
Rails?
Thanks,
Jeff