From d37604f03ee9af7cf2d65ec2e1be986342a965c5 Mon Sep 17 00:00:00 2001 From: Kent Sibilev Date: Wed, 23 Aug 2006 09:34:46 +0000 Subject: Fixed XMLRPC multicall when one of the called methods returns a struct object. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionwebservice/test/abstract_dispatcher.rb | 5 +++++ actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'actionwebservice/test') diff --git a/actionwebservice/test/abstract_dispatcher.rb b/actionwebservice/test/abstract_dispatcher.rb index b857e4a957..e5a08392b4 100644 --- a/actionwebservice/test/abstract_dispatcher.rb +++ b/actionwebservice/test/abstract_dispatcher.rb @@ -110,6 +110,7 @@ module DispatcherTest api_method :getCategories, :returns => [[:string]] api_method :bool, :returns => [:bool] api_method :alwaysFail + api_method :person, :returns => [Person] end class BloggerAPI < ActionWebService::API::Base @@ -133,6 +134,10 @@ module DispatcherTest def alwaysFail raise "MT AlwaysFail" end + + def person + Person.new('id' => 1, 'name' => 'person1') + end end class BloggerService < ActionWebService::Base diff --git a/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb b/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb index 95c9333954..8add576620 100644 --- a/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +++ b/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb @@ -28,7 +28,8 @@ class TC_DispatcherActionControllerXmlRpc < Test::Unit::TestCase {'methodName' => 'mt.alwaysFail'}, {'methodName' => 'blogger.alwaysFail'}, {'methodName' => 'mt.blah'}, - {'methodName' => 'blah.blah'} + {'methodName' => 'blah.blah'}, + {'methodName' => 'mt.person'} ]) assert_equal [ [["mtCat1", "mtCat2"]], @@ -38,7 +39,8 @@ class TC_DispatcherActionControllerXmlRpc < Test::Unit::TestCase {"faultCode" => 3, "faultString" => "MT AlwaysFail"}, {"faultCode" => 3, "faultString" => "Blogger AlwaysFail"}, {"faultCode" => 4, "faultMessage" => "no such method 'blah' on API DispatcherTest::MTAPI"}, - {"faultCode" => 4, "faultMessage" => "no such web service 'blah'"} + {"faultCode" => 4, "faultMessage" => "no such web service 'blah'"}, + [{"name"=>"person1", "id"=>1}] ], response end -- cgit v1.2.3