aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service/dispatcher/abstract.rb
diff options
context:
space:
mode:
authorKent Sibilev <ksibilev@gmail.com>2006-08-23 09:34:46 +0000
committerKent Sibilev <ksibilev@gmail.com>2006-08-23 09:34:46 +0000
commitd37604f03ee9af7cf2d65ec2e1be986342a965c5 (patch)
treed15498a8460a37f8d1af65217ff7cd5acddb2ab3 /actionwebservice/lib/action_web_service/dispatcher/abstract.rb
parent8cbe22ab5155680fa0ef2da4321a4f291aaf78fe (diff)
downloadrails-d37604f03ee9af7cf2d65ec2e1be986342a965c5.tar.gz
rails-d37604f03ee9af7cf2d65ec2e1be986342a965c5.tar.bz2
rails-d37604f03ee9af7cf2d65ec2e1be986342a965c5.zip
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
Diffstat (limited to 'actionwebservice/lib/action_web_service/dispatcher/abstract.rb')
-rw-r--r--actionwebservice/lib/action_web_service/dispatcher/abstract.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb
index 96016ef67e..9c981e4ec1 100644
--- a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb
+++ b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb
@@ -62,7 +62,7 @@ module ActionWebService # :nodoc:
responses = []
invocations.each do |invocation|
if invocation.is_a?(Hash)
- responses << invocation
+ responses << [invocation, nil]
next
end
begin
@@ -74,15 +74,18 @@ module ActionWebService # :nodoc:
end
api_method = invocation.api_method
if invocation.api.has_api_method?(api_method.name)
+ response_type = (api_method.returns ? api_method.returns[0] : nil)
return_value = api_method.cast_returns(return_value)
+ else
+ response_type = ActionWebService::SignatureTypes.canonical_signature_entry(return_value.class, 0)
end
- responses << [return_value]
+ responses << [return_value, response_type]
rescue Exception => e
- responses << { 'faultCode' => 3, 'faultString' => e.message }
+ responses << [{ 'faultCode' => 3, 'faultString' => e.message }, nil]
end
end
invocation = invocations[0]
- invocation.protocol.encode_response('system.multicall', responses, nil, invocation.protocol_options)
+ invocation.protocol.encode_multicall_response(responses, invocation.protocol_options)
end
def web_service_invocation(request, level = 0)