diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-03 03:19:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-03 03:19:37 +0000 |
commit | 3d4965765cd47df7f3f9d3db4cbb117936b1c939 (patch) | |
tree | a7dcd1024112bde8716f09c1e75da22cb640d38f /actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb | |
parent | 94725b02bcc5e623dcbe1d73d57b2ede2c88440e (diff) | |
download | rails-3d4965765cd47df7f3f9d3db4cbb117936b1c939.tar.gz rails-3d4965765cd47df7f3f9d3db4cbb117936b1c939.tar.bz2 rails-3d4965765cd47df7f3f9d3db4cbb117936b1c939.zip |
Fix a ton of issues with AWS (yes, Kent saved it from being unbundled in 1.1) #4038 [Kent Sibilev]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb')
-rw-r--r-- | actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb b/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb index b36e029669..fa917ad4a5 100644 --- a/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +++ b/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb @@ -32,7 +32,9 @@ module ActionWebService end def ruby_to_soap(obj) - SOAP::Mapping.obj2soap(obj, @registry) + soap = SOAP::Mapping.obj2soap(obj, @registry) + soap.elename = XSD::QName.new if SOAP::Version >= "1.5.5" && soap.elename == XSD::QName::EMPTY + soap end def register_type(type) @@ -63,12 +65,21 @@ module ActionWebService end @type2binding[type] = array_binding ? array_binding : type_binding + + if type.structured? + type.each_member do |m_name, m_type| + register_type(m_type) + end + end + @type2binding[type] end alias :lookup_type :register_type def annotate_arrays(binding, value) - if binding.type.array? + if value.nil? + return + elsif binding.type.array? mark_typed_array(value, binding.element_binding.qname) if binding.element_binding.type.custom? value.each do |element| |