aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/test/abstract_dispatcher.rb
diff options
context:
space:
mode:
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)