new2

new2(uri, proxy=nil, timeout=nil) Class Public methods Creates an object which represents the remote XML-RPC server at the given uri. The URI should have a host, port, path, user and password. Example: user:password@host:port/path Raises an ArgumentError if the uri is invalid, or if the protocol isn't http or https. If a proxy is given it should be in the form of âhost:portâ. The optional timeout defaults to 30 seconds. new_from_uri

new

new(host=nil, path=nil, port=nil, proxy_host=nil, proxy_port=nil, user=nil, password=nil, use_ssl=nil, timeout=nil) Class Public methods Creates an object which represents the remote XML-RPC server on the given host. If the server is CGI-based, path is the path to the CGI-script, which will be called, otherwise (in the case of a standalone server) path should be "/RPC2". port is the port on which the XML-RPC server listens. If proxy_host is given, then a proxy server listening at p

method_missing

method_missing(mid, *args) Instance Public methods Every method call is forwarded to the XML-RPC server defined in XMLRPC::Client::Proxy#new. Note: Inherited methods from class Object cannot be used as XML-RPC names, because they get around method_missing.

new

new(server, prefix, args=[], meth=:call, delim=".") Class Public methods Creates an object which provides #method_missing. The given server must be an instance of XMLRPC::Client, which is the XML-RPC server to be used for a XML-RPC call. prefix and delim will be prepended to the method name called onto this object. An optional parameter meth is the method to use for a RPC. It can be either, call, call2, call_async, call2_async args are arguments which are automatically given to eve

serve

serve() Instance Public methods Call this after you have added all you handlers to the server. This method processes a XML-RPC method call and sends the answer back to the client.

new 2

new(*a) Class Public methods

new

new(*a) Class Public methods Creates a new XMLRPC::CGIServer instance. All parameters given are by-passed to XMLRPC::BasicServer.new. You can only create one XMLRPC::CGIServer instance, because more than one makes no sense.

set_service_hook

set_service_hook(&handler) Instance Public methods A service-hook is called for each service request (RPC). You can use a service-hook for example to wrap existing methods and catch exceptions of them or convert values to values recognized by XMLRPC. You can disable it by passing nil as the handler parameter. The service-hook is called with a Proc object along with any parameters. An example: server.set_service_hook {|obj, *args| begin ret = obj.call(*args) # call the or

set_default_handler

set_default_handler(&handler) Instance Public methods Sets handler as the default-handler, which is called when no handler for a method-name is found. handler is a code-block. The default-handler is called with the (XML-RPC) method-name as first argument, and the other arguments are the parameters given by the client-call. If no block is specified the default of XMLRPC::BasicServer is used, which raises a XMLRPC::FaultException saying âmethod missingâ.

process

process(data) Instance Public methods