From 631340d5d1b6c3bc610960116226789c4f51eecc Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Wed, 2 Mar 2005 22:55:00 +0000 Subject: make the marshaler use the same set of columns as the code that generates WSDL, avoids mismatches when there are associations in the AR model class. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionwebservice/lib/action_web_service') diff --git a/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb b/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb index 3032639510..72f006b654 100644 --- a/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb +++ b/actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb @@ -220,7 +220,9 @@ module WS return nil end soap_obj = soap_class.new(obj.class.instance_variable_get('@qname')) - obj.attributes.each do |key, value| + obj.class.columns.each do |column| + key = column.name.to_s + value = obj.send(key) soap_obj[key] = SOAP::Mapping._obj2soap(value, map) end soap_obj -- cgit v1.2.3