aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-06-13 03:22:01 +0000
committerLeon Breedt <bitserf@gmail.com>2005-06-13 03:22:01 +0000
commitfa7f4a066466f8587ddd11b96dcbbe5008ab63a9 (patch)
tree5376064701265cb984a0c0534b78131b70b4129f /actionwebservice
parent887e67c80e12308467526d731e74fafef9f07ac9 (diff)
downloadrails-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')
-rw-r--r--actionwebservice/CHANGELOG2
-rw-r--r--actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb15
2 files changed, 16 insertions, 1 deletions
diff --git a/actionwebservice/CHANGELOG b/actionwebservice/CHANGELOG
index c1fffb523a..f5e6e575b4 100644
--- a/actionwebservice/CHANGELOG
+++ b/actionwebservice/CHANGELOG
@@ -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
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