aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service/protocol/abstract.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionwebservice/lib/action_web_service/protocol/abstract.rb')
-rw-r--r--actionwebservice/lib/action_web_service/protocol/abstract.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/actionwebservice/lib/action_web_service/protocol/abstract.rb b/actionwebservice/lib/action_web_service/protocol/abstract.rb
index 7526539d53..ed50a6ffde 100644
--- a/actionwebservice/lib/action_web_service/protocol/abstract.rb
+++ b/actionwebservice/lib/action_web_service/protocol/abstract.rb
@@ -3,17 +3,31 @@ module ActionWebService # :nodoc:
class ProtocolError < ActionWebServiceError # :nodoc:
end
+ class AbstractProtocol
+ attr :marshaler
+ attr :encoder
+
+ def marshal_response(method, return_value)
+ body = method.encode_rpc_response(marshaler, encoder, return_value)
+ Response.new(body, 'text/xml')
+ end
+ end
+
class Request # :nodoc:
attr :protocol
attr :method_name
attr :method_params
attr :service_name
+ attr_accessor :api
+ attr_accessor :api_method
- def initialize(protocol, method_name, method_params, service_name)
+ def initialize(protocol, method_name, method_params, service_name, api=nil, api_method=nil)
@protocol = protocol
@method_name = method_name
@method_params = method_params
@service_name = service_name
+ @api = api
+ @api_method = api_method
end
end