aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test/abstract_dispatcher.rb
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-08-16 05:45:03 +0000
committerLeon Breedt <bitserf@gmail.com>2005-08-16 05:45:03 +0000
commit9d79880e81a035c96ca70d7e342549236ed1f242 (patch)
treeb73f49f050a35fd24db52bb591efe9c629ce032b /actionwebservice/test/abstract_dispatcher.rb
parent2eba7134455863f936d0b1e8e88284c08ef6b083 (diff)
downloadrails-9d79880e81a035c96ca70d7e342549236ed1f242.tar.gz
rails-9d79880e81a035c96ca70d7e342549236ed1f242.tar.bz2
rails-9d79880e81a035c96ca70d7e342549236ed1f242.zip
add 'system.multicall' support to XML-RPC. boxcarred methods must still exist
on the target service(s), value casting will still be performed, and recursive 'system.multicall' calls are not allowed. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/abstract_dispatcher.rb')
-rw-r--r--actionwebservice/test/abstract_dispatcher.rb27
1 files changed, 25 insertions, 2 deletions
diff --git a/actionwebservice/test/abstract_dispatcher.rb b/actionwebservice/test/abstract_dispatcher.rb
index 4f8cd1fb4c..94edb213fa 100644
--- a/actionwebservice/test/abstract_dispatcher.rb
+++ b/actionwebservice/test/abstract_dispatcher.rb
@@ -107,11 +107,15 @@ module DispatcherTest
class MTAPI < ActionWebService::API::Base
inflect_names false
api_method :getCategories, :returns => [[:string]]
+ api_method :bool, :returns => [:bool]
+ api_method :alwaysFail
end
class BloggerAPI < ActionWebService::API::Base
inflect_names false
api_method :getCategories, :returns => [[:string]]
+ api_method :str, :expects => [:int], :returns => [:string]
+ api_method :alwaysFail
end
class MTService < ActionWebService::Base
@@ -120,6 +124,14 @@ module DispatcherTest
def getCategories
["mtCat1", "mtCat2"]
end
+
+ def bool
+ 'y'
+ end
+
+ def alwaysFail
+ raise "MT AlwaysFail"
+ end
end
class BloggerService < ActionWebService::Base
@@ -128,6 +140,17 @@ module DispatcherTest
def getCategories
["bloggerCat1", "bloggerCat2"]
end
+
+ def str(int)
+ unless int.is_a?(Integer)
+ raise "Not an integer!"
+ end
+ 500 + int
+ end
+
+ def alwaysFail
+ raise "Blogger AlwaysFail"
+ end
end
class AbstractController < ActionController::Base
@@ -439,8 +462,8 @@ module DispatcherCommonTests
public_method_name = real_method_name
request_env['HTTP_SOAPACTION'] = "/soap/#{service_name}/#{real_method_name}"
end
- api = container.web_service_object(service_name.to_sym).class.web_service_api
- method = api.public_api_method_instance(real_method_name)
+ api = container.web_service_object(service_name.to_sym).class.web_service_api rescue nil
+ method = api.public_api_method_instance(real_method_name) rescue nil
service_name = self.service_name(container)
end
protocol.register_api(api)