From 594063f23cf8e7cecd24329e801992784f420b55 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Mon, 28 Mar 2005 03:20:13 +0000 Subject: generalize casting code to be used by both SOAP and XML-RPC (previously only XML-RPC). switch to better model for API methods, and improve the ability to generate protocol requests/response, will be required by upcoming scaffolding. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../action_web_service/protocol/xmlrpc_protocol.rb | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb') diff --git a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb index 8d6af246ec..f3e4a23b4b 100644 --- a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +++ b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb @@ -5,9 +5,7 @@ module ActionWebService # :nodoc: base.register_protocol(XmlRpcProtocol) end - class XmlRpcProtocol # :nodoc: - attr :marshaler - + class XmlRpcProtocol < AbstractProtocol # :nodoc: def initialize @encoder = WS::Encoding::XmlRpcEncoding.new @marshaler = WS::Marshaling::XmlRpcMarshaler.new @@ -22,22 +20,6 @@ module ActionWebService # :nodoc: nil end - def marshal_response(method_name, return_value, signature_type) - if !return_value.nil? && signature_type - type_binding = @marshaler.register_type(signature_type) - info = WS::ParamInfo.create(signature_type, type_binding, 0) - return_value = @marshaler.marshal(WS::Param.new(return_value, info)) - else - return_value = nil - end - body = @encoder.encode_rpc_response(method_name, return_value) - Response.new(body, 'text/xml') - end - - def register_signature_type(spec) - nil - end - def protocol_client(api, protocol_name, endpoint_uri, options) return nil unless protocol_name == :xmlrpc ActionWebService::Client::XmlRpc.new(api, endpoint_uri, options) -- cgit v1.2.3