From 3d4965765cd47df7f3f9d3db4cbb117936b1c939 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 3 Mar 2006 03:19:37 +0000 Subject: 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 --- .../protocol/soap_protocol/marshaler.rb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'actionwebservice/lib/action_web_service/protocol/soap_protocol') 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| -- cgit v1.2.3