We have a working Rails app parsing XML formatted info. Running under Rails 1.1.6, things work fine as evident in the log: Parameters: {"action"=>"post_test_result", "controller"=>"tester/ data", "<rma_request>\n\t <request>PostTestResult</request>\n\t <content>\n <version>1</version>\n <! [CDATA[HEADER_START\r\nTest Station: Station-1\r\nOperator: joe\r \nTest Program Vers: 1.73\r\nScript File: xxxxx_00_xx2000_R1A.TXT\r \nScript Rev: 1.00, 03/12/07\r\nTest Date: 03/16/07 11:07:46\r\nUnit Serial Number: xxxxx***xxxxxx170101\r\nPOWER-UP - SSID,,----,----,,Pass \r\n\r\nTEST_DATA_END]]>\n </content>\n</rma_request>"=>""} Completed in 0.10780 (9 reqs/sec) | Rendering: 0.00076 (0%) | DB: 0.04805 (44%) | 200 But, does anyone know why the CDATA is cropped as soon as we attempt to run the same code with Rails 1.2.2, as evidenced below? Many thanks for any thoughts and help on troubleshooting this issue.. Processing DataController#post_test_result (for 10.139.0.12 at 2007-03-29 12:02:11) [POST] Session ID: 6621ea16007eadec31aca33cb695df58 Parameters: {"action"=>"post_test_result", "<rma_request>\n\t <request>PostTestResult</request>\n\t <content>\n <version>1</version>\n <!"=>{}, "controller"=>"tester/data"} FAIL :: build_xml_request :: #<REXML::ParseException: Malformed node Line: 1 Position: 0 Last 80 unconsumed characters: <!> /usr/local/lib/ruby/1.8/rexml/parsers/baseparser.rb:316:in `pull'' /usr/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'' /usr/local/lib/ruby/1.8/rexml/document.rb:178:in `build'' /usr/local/lib/ruby/1.8/rexml/document.rb:45:in `initialize'' /home/www/lsapi/rma/config/../app/controllers/tester/xml_controller.rb: 24:in `build_xml_request'' /home/www/lsapi/rma/config/../app/controllers/tester/ data_controller.rb:9:in `post_test_result'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:1095:in `perform_action_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:632:in `call_filter'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:638:in `call_filter'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:438:in `call'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:637:in `call_filter'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:619:in `perform_action_without_benchmark'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:in `perform_action_without_rescue'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:in `perform_action_without_rescue'' /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ action_controller/rescue.rb:83:in `perform_action'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:430:in `process_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ action_controller/filters.rb:624:in `process_without_session_management_support'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/session_management.rb:114:in `process'' /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ action_controller/base.rb:330:in `process'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:41:in `dispatch'' /usr/local/lsws/fcgi-bin/RailsRunner.rb:14 ... Malformed node Line: 1 Position: 0 Last 80 unconsumed characters: <! Line: 1 Position: 0 Last 80 unconsumed characters: <! Completed in 0.02440 (40 reqs/sec) | Rendering: 0.00290 (11%) | DB: 0.00884 (36%) | 200 OK [ http://rma.demo.info/tester/data/post_test_result] OK [http://rma.balboaweb.info/tester/data/post_test_result ] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Looking at it some more, it appears the message is getting cut off in the process of being transferred. Because the same message setup as a test value works just fine. So, does anyone have any idea why a XML message might get munged in flight by the gems in rails > 1.1.6? Hoping someone can shed some light on this issue, cuz we are stumped. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
After looking all over the place on this issue, it appears a specific CDATA change was made for ActionPack 1.13.2. Can anyone related to ActionPack give us a clue why our entry is faulty and should not work? As far as documentation, our call seems to be formatted correctly. We would very much like to get this working and move past Rails 1.1.6. On Mar 29, 12:34 pm, "markoma" <mark...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> We have a working Rails app parsing XML formatted info. Running under > Rails 1.1.6, things work fine as evident in the log: > > Parameters: {"action"=>"post_test_result", "controller"=>"tester/ > data", "<rma_request>\n\t <request>PostTestResult</request>\n\t > <content>\n <version>1</version>\n <! > [CDATA[HEADER_START\r\nTest Station: Station-1\r\nOperator: joe\r > \nTest Program Vers: 1.73\r\nScript File: xxxxx_00_xx2000_R1A.TXT\r > \nScript Rev: 1.00, 03/12/07\r\nTest Date: 03/16/07 11:07:46\r\nUnit > Serial Number: xxxxx***xxxxxx170101\r\nPOWER-UP - SSID,,----,----,,Pass > \r\n\r\nTEST_DATA_END]]>\n </content>\n</rma_request>"=>""} > Completed in 0.10780 (9 reqs/sec) | Rendering: 0.00076 (0%) | DB: > 0.04805 (44%) | 200 > > But, does anyone know why the CDATA is cropped as soon as we attempt > to run the same code with Rails 1.2.2, as evidenced below? Many > thanks for any thoughts and help on troubleshooting this issue.. > > Processing DataController#post_test_result (for 10.139.0.12 at > 2007-03-29 12:02:11) [POST] > Session ID: 6621ea16007eadec31aca33cb695df58 > Parameters: {"action"=>"post_test_result", "<rma_request>\n\t > <request>PostTestResult</request>\n\t <content>\n > <version>1</version>\n <!"=>{}, "controller"=>"tester/data"} > FAIL :: build_xml_request :: #<REXML::ParseException: Malformed node > Line: 1 > Position: 0 > Last 80 unconsumed characters: > <!> > /usr/local/lib/ruby/1.8/rexml/parsers/baseparser.rb:316:in `pull'' > /usr/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:21:in `parse'' > /usr/local/lib/ruby/1.8/rexml/document.rb:178:in `build'' > /usr/local/lib/ruby/1.8/rexml/document.rb:45:in `initialize'' > /home/www/lsapi/rma/config/../app/controllers/tester/xml_controller.rb: > 24:in `build_xml_request'' > /home/www/lsapi/rma/config/../app/controllers/tester/ > data_controller.rb:9:in `post_test_result'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/base.rb:1095:in `perform_action_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/filters.rb:632:in `call_filter'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/filters.rb:638:in `call_filter'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/filters.rb:438:in `call'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/filters.rb:637:in `call_filter'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/filters.rb:619:in `perform_action_without_benchmark'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/benchmarking.rb:66:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/benchmarking.rb:66:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ > action_controller/rescue.rb:83:in `perform_action'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/base.rb:430:in `process_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ > action_controller/filters.rb:624:in > `process_without_session_management_support'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ > action_controller/session_management.rb:114:in `process'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.13.2/lib/ > action_controller/base.rb:330:in `process'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:41:in > `dispatch'' > /usr/local/lsws/fcgi-bin/RailsRunner.rb:14 > ... > Malformed node > Line: 1 > Position: 0 > Last 80 unconsumed characters: > <! > Line: 1 > Position: 0 > Last 80 unconsumed characters: > <! > Completed in 0.02440 (40 reqs/sec) | Rendering: 0.00290 (11%) | DB: > 0.00884 (36%) | 200 OK [http://rma.demo.info/tester/data/post_test_result] > OK [http://rma.balboaweb.info/tester/data/post_test_result]--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---