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
This commit is contained in:
Leon Breedt
2005-06-13 03:22:01 +00:00
parent 887e67c80e
commit fa7f4a0664
2 changed files with 16 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Add workaround for Ruby 1.8.3's SOAP4R changing the return value of SOAP::Mapping::Registry#find_mapped_soap_class #1414 [Shugo Maeda]
* Fix moduled controller URLs in WSDL, and add unit test to verify the generated URL #1428
* Fix scaffolding template paths, it was broken on Win32

View File

@@ -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