Ruby 2.0.0 リファレンスマニュアル > ライブラリ一覧 > xmlrpc/clientライブラリ > XMLRPC::Clientクラス > call

instance method XMLRPC::Client#call

call(method, *args)[permalink][rdoc]

Invokes the method named method with the parameters given by args on the XML-RPC server. The parameter method is converted into a String and should be a valid XML-RPC method-name. Each parameter of args must be of one of the following types, where Hash, Struct and Array can contain any of these listed ((:types:)):

The method returns the return-value from the RPC ((-stands for Remote Procedure Call-)). The type of the return-value is one of the above shown, only that a Bignum is only allowed when it fits in 32-bit and that a XML-RPC (('dateTime.iso8601')) type is always returned as a XMLRPC::DateTime object and a Struct is never returned, only a Hash, the same for a Symbol, where always a String is returned. A XMLRPC::Base64 is returned as a String from xmlrpc4r version 1.6.1 on.

If the remote procedure returned a fault-structure, then a XMLRPC::FaultException exception is raised, which has two accessor-methods faultCode and faultString of type Integer and String.