Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #419 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

obj2soap fails mapping ActiveRecord object

Reported by: user Assigned to: nahi
Priority: normal Milestone: undefined
Component: soap4r Version: 1.5
Keywords: Cc: chris@aviation-software.net

Description

Using Rails 1.2.3 and ActionWebservice? with builtin soap4r or newest rc candidate (20070906) I get the following when passing an ActiveRecord? object:

Cannot map Scenario to SOAP/OM.

/usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:355:in `_obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:299:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:131:in `_obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:43:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:554:in `protect_mapping' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:531:in `protect_threadvars' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:547:in `protect_mapping' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:42:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol/marshaler.rb:35:in `ruby_to_soap' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:72:in `encode_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:70:in `map' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:70:in `encode_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:76:in `invoke_submit' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:67:in `invoke_submit' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/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.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!' /www/capplan_ws-dv/public/dispatch.fcgi:24 /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:355:in `_obj2soap': Cannot map HashWithIndifferentAccess? to SOAP/OM: (SOAP::Mapping::MappingError?) [NESTED] /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:299:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:131:in `_obj2soap' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol/marshaler.rb:186:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol/marshaler.rb:183:in `each' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol/marshaler.rb:183:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:64:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:63:in `each' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:63:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:342:in `_obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:299:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:131:in `_obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:43:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:554:in `protect_mapping' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:531:in `protect_threadvars' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:547:in `protect_mapping' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:42:in `obj2soap' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol/marshaler.rb:35:in `ruby_to_soap' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:72:in `encode_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:70:in `map' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:70:in `encode_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:76:in `invoke_submit' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:67:in `invoke_submit' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/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.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!' /www/capplan_ws-dv/public/dispatch.fcgi:24

I modified line 354 in encodedregistry.rb to print the cause as follows: raise MappingError?.new("Cannot map #{ obj.class.name } to SOAP/OM: #{cause}", cause)

which then produces: Cannot map Scenario to SOAP/OM: Cannot map HashWithIndifferentAccess? to SOAP/OM:

I'm a bit stuck as to how to move forward. Any workarounds/thoughts?

Attachments

hash.diff (0.8 kB) - added by nahi on 09/11/07 18:07:19.

Change History

09/11/07 18:07:19 changed by nahi

  • attachment hash.diff added.

09/11/07 18:08:24 changed by nahi

  • type changed from defect to enhancement.

Can you try the attached patch? (hash.diff) Please let me know if it works for you. I'll incorporate it in soap4r-1.5.8 if it works.

09/11/07 22:32:55 changed by user

I've tried the patch. The same error is not happening any longer, but it seems to have somehow broken interoperability with Rails:

ActionWebService::Protocol::ProtocolError? in ScenarioController#invoke_submit?

Failed to parse SOAP request message

RAILS_ROOT: /www/capplan_ws-dv/public/../config/.. Application Trace | Framework Trace | Full Trace

/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:86:in `decode_response' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:85:in `invoke_submit' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:67:in `invoke_submit' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/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.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!' /www/capplan_ws-dv/public/dispatch.fcgi:24

/usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:86:in `decode_response' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:85:in `invoke_submit' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:67:in `invoke_submit' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/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.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!' /www/capplan_ws-dv/public/dispatch.fcgi:24

The code before the exception looks like:

def decode_response(raw_response)

envelope = SOAP::Processor.unmarshal(raw_response) unless envelope

raise ProtocolError?, "Failed to parse SOAP request message"

end

I inserted code to get the "raw_response" variable. raw_response.inspect returns the following:

Internal protocol error: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[]=

Backtrace: /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1973:in `write_attribute' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1534:in `id=' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:347:in `send' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:347:in `set_attributes' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:342:in `each' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:342:in `set_attributes' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/factory.rb:88:in `setiv2struct' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/factory.rb:35:in `setiv2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/rubytypeFactory.rb:445:in `unknownstruct2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/rubytypeFactory.rb:405:in `unknowntype2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/rubytypeFactory.rb:251:in `soap2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:381:in `_soap2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/encodedregistry.rb:309:in `soap2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:150:in `_soap2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:65:in `soap2obj' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:554:in `protect_mapping' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:531:in `protect_threadvars' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:547:in `protect_mapping' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/mapping/mapping.rb:64:in `soap2obj' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol/marshaler.rb:31:in `soap_to_ruby' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:61:in `decode_request' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/inflector.rb:250:in `collect' /usr/local/lib/ruby/gems/1.8/gems/soap4r-1.5.7.90.20070906/lib/soap/baseData.rb:600:in `each' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:61:in `collect' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:61:in `decode_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/soap_protocol.rb:45:in `decode_action_pack_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/discovery.rb:20:in `discover_web_service_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/discovery.rb:18:in `each' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/protocol/discovery.rb:18:in `discover_web_service_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:46:in `dispatch_web_service_request' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:83:in `invoke_submit' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/action_web_service/scaffolding.rb:67:in `invoke_submit' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:638:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:637:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:634:in `call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/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.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!' /www/capplan_ws-dv/public/dispatch.fcgi:24

09/11/07 22:43:21 changed by user

  • cc set to chris@aviation-software.net.