Sha256: 06bd709b5df3195a635bf0f43ccd82ed55b7f9e46ad3ac51a09e6c098ec61162

Contents?: true

Size: 647 Bytes

Versions: 1

Compression:

Stored size: 647 Bytes

Contents

require 'xmlrpc/marshal'

require 'nitro/service'

module Nitro

# The XML-RPC protocol.

module XmlRpc

  # === In
  #
  # [+request+]
  #    Raw request data.
  #
  # === Out
  #
  #  [+method+]
  #  [+args+]  
  
  def decode_request(request)
    method, args = XMLRPC::Marshal.load_call(request)
    Logger.debug "Calling XML-RPC method '#{method}'" if $DBG
    return method.gsub(/\./, '__'), args
  end

  def encode_response(method_name, response)
    XMLRPC::Marshal.dump_response(response)
  end

  private

end

# The XML-RPC base service.

class XmlRpcService < Service
  include XmlRpc
end
  
end

# * George Moschovitis <gm@navel.gr>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.22.0 lib/nitro/service/xmlrpc.rb