diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-06-13 03:22:01 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-06-13 03:22:01 +0000 |
commit | fa7f4a066466f8587ddd11b96dcbbe5008ab63a9 (patch) | |
tree | 5376064701265cb984a0c0534b78131b70b4129f /actionwebservice/lib/action_web_service | |
parent | 887e67c80e12308467526d731e74fafef9f07ac9 (diff) | |
download | rails-fa7f4a066466f8587ddd11b96dcbbe5008ab63a9.tar.gz rails-fa7f4a066466f8587ddd11b96dcbbe5008ab63a9.tar.bz2 rails-fa7f4a066466f8587ddd11b96dcbbe5008ab63a9.zip |
Add workaround for SOAP4R changing find_mapped_soap_class return value [Shugo Maeda]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service')
-rw-r--r-- | actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb | 15 |
1 files changed, 14 insertions, 1 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 eb8f6f1147..78eee620eb 100644 --- a/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +++ b/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb @@ -3,13 +3,26 @@ require 'soap/mapping' module ActionWebService module Protocol module Soap + # Workaround for SOAP4R return values changing + class Registry < SOAP::Mapping::Registry + if SOAP::Version >= "1.5.4" + def find_mapped_soap_class(obj_class) + return @map.instance_eval { @obj2soap[obj_class][0] } + end + + def find_mapped_obj_class(soap_class) + return @map.instance_eval { @soap2obj[soap_class][0] } + end + end + end + class SoapMarshaler attr :type_namespace attr :registry def initialize(type_namespace=nil) @type_namespace = type_namespace || 'urn:ActionWebService' - @registry = SOAP::Mapping::Registry.new + @registry = Registry.new @type2binding = {} register_static_factories end |