From fa7f4a066466f8587ddd11b96dcbbe5008ab63a9 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Mon, 13 Jun 2005 03:22:01 +0000 Subject: 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 --- .../protocol/soap_protocol/marshaler.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'actionwebservice/lib/action_web_service') 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 -- cgit v1.2.3