Class | ActionWebService::Client::XmlRpc |
In: |
vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb
|
Parent: | Base |
Implements XML-RPC client support
class BloggerAPI < ActionWebService::API::Base inflect_names false api_method :getRecentPosts, :returns => [[Blog::Post]] end blog = ActionWebService::Client::XmlRpc.new(BloggerAPI, "http://.../RPC", :handler_name => "blogger") posts = blog.getRecentPosts
Creates a new web service client using the XML-RPC protocol.
api must be an ActionWebService::API::Base derivative, and endpoint_uri must point at the relevant URL to which protocol requests will be sent with HTTP POST.
Valid options:
# File vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb, line 30 30: def initialize(api, endpoint_uri, options={}) 31: @api = api 32: @handler_name = options[:handler_name] 33: @protocol = ActionWebService::Protocol::XmlRpc::XmlRpcProtocol.new 34: @client = XMLRPC::Client.new2(endpoint_uri, options[:proxy], options[:timeout]) 35: end