aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-03-02 22:55:00 +0000
committerLeon Breedt <bitserf@gmail.com>2005-03-02 22:55:00 +0000
commit631340d5d1b6c3bc610960116226789c4f51eecc (patch)
tree31350110d18960be1234198ced169a2c1d3fbd73
parent6d688aa20c1075aa37134c2bfa9d7eae75f90437 (diff)
downloadrails-631340d5d1b6c3bc610960116226789c4f51eecc.tar.gz
rails-631340d5d1b6c3bc610960116226789c4f51eecc.tar.bz2
rails-631340d5d1b6c3bc610960116226789c4f51eecc.zip
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
-rw-r--r--actionwebservice/CHANGELOG2
-rw-r--r--actionwebservice/TODO8
-rw-r--r--actionwebservice/lib/action_web_service/vendor/ws/marshaling/soap_marshaling.rb4
3 files changed, 13 insertions, 1 deletions
diff --git a/actionwebservice/CHANGELOG b/actionwebservice/CHANGELOG
index 77fd903407..f823c293ba 100644
--- a/actionwebservice/CHANGELOG
+++ b/actionwebservice/CHANGELOG
@@ -1,5 +1,7 @@
*0.6.0* (Unreleased)
+* Make the SOAP WS marshaler use #columns to decide which fields to marshal as well, avoids providing attributes brought in by associations
+
* Add <tt>ActionWebService::API::Base.allow_active_record_expects</tt> option, with a default of false. Setting this to true will allow specifying ActiveRecord::Base model classes in <tt>:expects</tt>. API writers should take care to validate the received ActiveRecord model objects when turning it on, and/or have an authentication mechanism in place to reduce the security risk.
* Improve error message reporting. Bugs in either AWS or the web service itself will send back a protocol-specific error report message if possible, otherwise, provide as much detail as possible.
diff --git a/actionwebservice/TODO b/actionwebservice/TODO
index a5ca99e89f..55c484b775 100644
--- a/actionwebservice/TODO
+++ b/actionwebservice/TODO
@@ -1,3 +1,11 @@
+= 0.7.0
+ - WS Scaffolding
+ - WS Generators
+ - WS Test Integration
+
+= 0.8.0
+ - Consumption of WSDL services
+
= Refactoring
- Don't have clean way to go from SOAP Class object to the xsd:NAME type
string -- NaHi possibly looking at remedying this situation
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