No commit activity in last 3 years
No release in over 3 years
Extends the Ruby standard library XMLRPC::BasicServer, providing the Rack compatible XMLRPC::RackServer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme
= XMLRPC::RackServer

This gem extends the Ruby standard library XML-RPC server to be Rack
compatible.

== Installation

If bundler is used, just include the relevant line to Gemfile:

  gem 'xmlrpc-rack_server'

or in other projects:

  require 'rubygems'
  require 'xmlrpc-rack_server'

== Usage

Use the XML-RPC server as a normal Rack server, extended by the functionality
of the Ruby standard library XML-RPC server.

The Ruby standard library XML-RPC component documentation can be found at:
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/xmlrpc/rdoc/index.html and the Rack
documentation at: http://rack.rubyforge.org/doc/

== Examples

This creates a simple XML-RPC ping server running on Rack:

  class Ping
    def self.call(env)
      server = XMLRPC::RackServer.new
      server.add_introspection
      server.add_handler('weblogUpdates', self.new)
      server.call(env)
    end
  
    def ping(title, url)
      # Do whatever with title and url
      {:flerror => false, :message => 'Thanks for the ping.'}
    end
  end

If Ruby on Rails framework is used the Rack server can be mounted on routes.rb:

  Rails.application.routes.draw do |map|
    mount Ping => '/ping'
  end


Copyright (c) 2010-2011 Nikolaos Anastopoulos, released under the MIT license