Webservice - get client ip address

I have the following problem in my application I have
in the controller:

class XmlrpcController < ApplicationController
web_service_dispatching_mode :layered
wsdl_service_name ‘weblogUpdates.ping’
web_service_scaffold :invoke
web_service :weblogUpdates, WeblogUpdates.new

in the api definition file:

class WeblogUpdatesApi < ActionWebService::API::Base
inflect_names false

api_method :ping, :expects => [{:sitename=>:string},

{:url=>:string}], :returns => [XmlrpcStructs::PingInfo]

class WeblogUpdates < ActionWebService::Base
web_service_api WeblogUpdatesApi
def ping(sitename, url)
# a logic here

return XmlrpcStructs::PingInfo.new(:flerror => flerror, :message
=> message)

Everything works here
Now in my ping method I would like to use a request object
How can I pass a request from the controller to ping method
in WeblogUpdates class

I’m new to ruby on rails
If I posted this to the wrong group sorry and please direct me to the
right one


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs