るりまサーチ

最速Rubyリファレンスマニュアル検索!
90件ヒット [1-90件を表示] (0.017秒)
トップページ > クエリ:xmlrpc/server[x]

別のキーワード

  1. xmlrpc new
  2. xmlrpc/server new
  3. xmlrpc serve
  4. xmlrpc add_handler
  5. xmlrpc/server serve

検索結果

xmlrpc/server (38042.0)

XML-RPC サーバのためのライブラリです。

...P-like (handler functions)

require "xmlrpc/server"

s = XMLRPC::CGIServer.new

s.add_handler("sample.sumAndDifference") do |a,b|
{ "sum" => a + b, "difference" => a - b }
end

s.serve

==== Java-like (handler classes)

require "xmlrpc/server"

s = XMLRPC::CGIServer.new

clas...
...low)!!!
s.add_handler("sample", MyHandler.new)
s.serve


To return a fault-structure you have to raise an FaultException e.g.:

require "xmlrpc/server"

raise XMLRPC::FaultException.new(3, "division by Zero")

===== Security Note

From Brian Candler:

Above code sample has an extremely na...
...t needs a big red disclaimer.


From Michael:

A solution is to undef insecure methods or to use XMLRPC::iPIMethods as shown below:

require "xmlrpc/server"

class MyHandler
def sumAndDifference(a, b)
{ "sum" => a + b, "difference" => a - b }
end
end

# ... server initializatio...

XMLRPC::BasicServer#add_handler(name, signature=nil, help=nil) { aBlock } (8006.0)

Adds aBlock to the list of handlers, with name as the name of the method. Parameters signature and help are used by the Introspection method if specified, where signature is either an Array containing strings each representing a type of it's signature (the first is the return value) or an Array of Arrays if the method has multiple signatures. Value type-names are "int, boolean, double, string, dateTime.iso8601, base64, array, struct".

...at
XMLRPC::Client#call.
When a method fails, it can tell it the client by throwing an
XMLRPC::FaultException like in this example:
require "xmlrpc/server"

s.add_handler("michael.div") do |a,b|
if b == 0
raise XMLRPC::FaultException.new(1, "division by zero")
else...

XMLRPC::CGIServer (8006.0)

Implements a CGI-based XML-RPC server.

...Implements a CGI-based XML-RPC server.

require "xmlrpc/server"

s = XMLRPC::CGIServer.new

s.add_handler("michael.add") do |a,b|
a + b
end

s.add_handler("michael.div") do |a,b|
if b == 0
raise XMLRPC::FaultException.new(1, "division by zero")
else...

XMLRPC::Server (8006.0)

Implements a standalone XML-RPC server. The method serve) is left if a SIGHUP is sent to the program.

...Implements a standalone XML-RPC server. The method serve) is left if a SIGHUP is sent to the
program.

require "xmlrpc/server"

s = XMLRPC::Server.new(8080)

s.add_handler("michael.add") do |a,b|
a + b
end

s.add_handler("michael.div") do |a,b|
if b == 0
raise...

XMLRPC::WEBrickServlet (8006.0)

Implements a servlet for use with WEBrick, a pure Ruby (HTTP-) server framework.

...Implements a servlet for use with WEBrick, a pure Ruby (HTTP-) server framework.

require "webrick"
require "xmlrpc/server"

s = XMLRPC::WEBrickServlet.new
s.add_handler("michael.add") do |a,b|
a + b
end

s.add_handler("michael.div") do |a,b|
if b == 0
rai...

絞り込み条件を変える

XMLRPC::BasicServer#add_handler(interface, obj) (8001.0)

This is the third form of XMLRPC::BasicServer#add_handler.

This is the third form of XMLRPC::BasicServer#add_handler.

Use XMLRPC::interface to generate an ServiceInterface object, which
represents an interface (with signature and help text) for a handler class.

Parameter interface must be of type XMLRPC::ServiceInterface.
Adds all methods of obj which are...

XMLRPC::BasicServer#add_handler(prefix, obj) (8001.0)

This is the second form of XMLRPC::BasicServer#add_handler. To add an object write: server.add_handler("michael", MyHandlerClass.new) All public methods of MyHandlerClass are accessible to the XML-RPC clients by (('michael."name of method"')). This is where the class_delim in XMLRPC::BasicServer.new has it's role, a XML-RPC method-name is defined by prefix + class_delim + (('"name of method"')).

This is the second form of XMLRPC::BasicServer#add_handler.
To add an object write:
server.add_handler("michael", MyHandlerClass.new)
All public methods of MyHandlerClass are accessible to
the XML-RPC clients by (('michael."name of method"')). This is
where the class_delim in XMLRPC::BasicServer...

XMLRPC::BasicServer (8000.0)

Is the base class for all XML-RPC server-types (CGI, standalone). You can add handler and set a default handler. Do not use this server, as this is/should be an abstract class.

Is the base class for all XML-RPC server-types (CGI, standalone).
You can add handler and set a default handler.
Do not use this server, as this is/should be an abstract class.

=== How the method to call is found

The arity (number of accepted arguments) of a handler (method or Proc object) is
comp...

XMLRPC::BasicServer#add_introspection (8000.0)

Adds the introspection handlers "system.listMethods", "system.methodSignature" and "system.methodHelp", where only the first one works.

Adds the introspection handlers "system.listMethods", "system.methodSignature" and "system.methodHelp",
where only the first one works.

XMLRPC::BasicServer#add_multicall (8000.0)

Adds the multi-call handler "system.multicall".

Adds the multi-call handler "system.multicall".

絞り込み条件を変える

XMLRPC::BasicServer#get_default_handler (8000.0)

Returns the default-handler, which is called when no handler for a method-name is found. It is a Proc object or nil.

Returns the default-handler, which is called when no handler for
a method-name is found.
It is a Proc object or nil.

XMLRPC::BasicServer#get_service_hook (8000.0)

Returns the service-hook, which is called on each service request (RPC) unless it's nil.

Returns the service-hook, which is called on each service request (RPC) unless it's nil.

XMLRPC::BasicServer#set_default_handler(&handler) (8000.0)

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.

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...

XMLRPC::BasicServer#set_parser(parser) (8000.0)

Sets the XML parser to use for parsing XML documents. Should be an instance of a class from module XMLRPC::XMLParser. If this method is not called, then XMLRPC::Config::DEFAULT_PARSER is used.

Sets the XML parser to use for parsing XML documents.
Should be an instance of a class from module XMLRPC::XMLParser.
If this method is not called, then XMLRPC::Config::DEFAULT_PARSER is used.

XMLRPC::BasicServer#set_service_hook(&handler) (8000.0)

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 parameter handler .

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 parameter
handler .

The service-hook is called with a Proc obj...

絞り込み条件を変える

XMLRPC::BasicServer#set_writer(writer) (8000.0)

Sets the XML writer to use for generating XML output. Should be an instance of a class from module XMLRPC::XMLWriter. If this method is not called, then XMLRPC::Config::DEFAULT_WRITER is used.

Sets the XML writer to use for generating XML output.
Should be an instance of a class from module XMLRPC::XMLWriter.
If this method is not called, then XMLRPC::Config::DEFAULT_WRITER is used.

XMLRPC::BasicServer.new(class_delim=".") (8000.0)

Creates a new XMLRPC::BasicServer instance, which should not be done, because XMLRPC::BasicServer is an abstract class. This method should be called from a subclass indirectly by a super call in the method initialize. The parameter class_delim is used in XMLRPC::BasicServer#add_handler when an object is added as handler, to delimit the object-prefix and the method-name.

Creates a new XMLRPC::BasicServer instance, which should not be
done, because XMLRPC::BasicServer is an abstract class. This
method should be called from a subclass indirectly by a super call
in the method initialize. The parameter class_delim is used
in XMLRPC::BasicServer#add_handler when an obje...

XMLRPC::CGIServer#serve (8000.0)

Call this after you have added all you handlers to the server. This method processes a XML-RPC methodCall and sends the answer back to the client. Make sure that you don't write to standard-output in a handler, or in any other part of your program, this would case a CGI-based server to fail!

Call this after you have added all you handlers to the server.
This method processes a XML-RPC methodCall and sends the answer
back to the client.
Make sure that you don't write to standard-output in a handler, or in
any other part of your program, this would case a CGI-based server to fail!

XMLRPC::CGIServer.new(*a) (8000.0)

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.

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.

XMLRPC::ModRubyServer (8000.0)

Implements a XML-RPC server, which works with Apache mod_ruby. Use it in the same way as CGIServer!

Implements a XML-RPC server, which works with Apache mod_ruby.
Use it in the same way as CGIServer!

絞り込み条件を変える

XMLRPC::ModRubyServer#serve (8000.0)

@todo

@todo

XMLRPC::ModRubyServer.new(*args) (8000.0)

@todo

@todo

XMLRPC::Server#serve (8000.0)

Call this after you have added all you handlers to the server. This method starts the server to listen for XML-RPC requests and answer them.

Call this after you have added all you handlers to the server.
This method starts the server to listen for XML-RPC requests and answer them.

XMLRPC::Server#shutdown (8000.0)

Stops and shuts the server down.

Stops and shuts the server down.

XMLRPC::Server.new(port=8080, host="127.0.0.1", maxConnections=4, stdlog=$stdout, audit=true, debug=true, *a) (8000.0)

Creates a new XMLRPC::Server instance, which is a XML-RPC server listening on port port and accepts requests for the host host, which is by default only the localhost. The server is not started, to start it you have to call XMLRPC::Server#serve.

Creates a new XMLRPC::Server instance, which is a XML-RPC server listening on
port port and accepts requests for the host host, which is by default only the localhost.
The server is not started, to start it you have to call XMLRPC::Server#serve.

Parameters audit and debug are obsolete!

All additio...

絞り込み条件を変える

XMLRPC::WEBrickServlet#get_valid_ip (8000.0)

Return the via method XMLRPC::Server#set_valid_ip specified valid IP addresses.

Return the via method XMLRPC::Server#set_valid_ip specified
valid IP addresses.

XMLRPC::WEBrickServlet#set_valid_ip(*ip_addr) (8000.0)

Specifies the valid IP addresses that are allowed to connect to the server. Each IP is either a String or a Regexp.

Specifies the valid IP addresses that are allowed to connect to the server.
Each IP is either a String or a Regexp.

ruby 1.8.4 feature (12.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...GOTOU Yuuzou <gotoyuzo@notwork.org>
#
# * lib/xmlrpc/server.rb (XMLRPC::Server#initialize): should mount the
# servlet on "/".
#
# ?

#Wed Oct 05 03:59:09 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
#
# * lib/xmlrpc/server.rb (XMLRPC::Server#serve): delete wrong call
#...

xmlrpc (12.0)

XML-RPC を扱うためのライブラリです。

...arser(XMLRPC::XMLParser::XMLParser.new)
# ...

Server Example:

require 'xmlrpc/server'
# ...
s = XMLRPC::CGIServer.new
s.set_parser(XMLRPC::XMLParser::XMLStreamParser.new)
# ...

or:

require 'xmlrpc/server'
# ...
server = XMLRPC::Server.new(8080)
server.set_parser(XMLRPC::XML...