Method: ActionWebService::Protocol::XmlRpc::XmlRpcProtocol#encode_response

Defined in:
lib/action_web_service/protocol/xmlrpc_protocol.rb

#encode_response(method_name, return_value, return_type, protocol_options = {}) ⇒ Object



64
65
66
67
68
69
70
71
# File 'lib/action_web_service/protocol/xmlrpc_protocol.rb', line 64

def encode_response(method_name, return_value, return_type, protocol_options={})
  if return_value && return_type
    return_value = value_to_xmlrpc_wire_format(return_value, return_type)
  end
  return_value = false if return_value.nil?
  raw_response = XMLRPC::Marshal.dump_response(return_value)
  Response.new(raw_response, 'text/xml', return_value)
end