Ruby 1.8.4 Rails 1.1.6 XML post with xmlns

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:

user1 pwd1

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\tuser1\n\tpwd1\n",
“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:intypecast_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:intypecast_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:ininject’”,
“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:inparse_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:inparameters’”,
“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:inset_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:indispatch’”,
“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:inprocess!’”, “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:ineach_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:inprocess!’”,
“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

Hi all,

Sorry, but it’s not a reply to your problem. I’m just having the same
problem and I’d like to know if you found a solution. If not, could
someone please help us ?

Thanks

Sam

[email protected] a écrit :

In addition to my previous post, here is a summary of my case :

  • works perfectly with the “invoke” scaffold within Rails
  • works perfectly with command line invocation (curl, wget with
    post-file)
  • doesn’t work with a compiled C program working with libsoap.so
    (called “soapclient” which comes with the library). The generated
    xml-post SEEMS to be the same as I used with the previous tests
    (comparison made with Rails logs backtrace).

All tests performed on the same linux machine.

Cheers

Sam

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs