# Using Camping with XMLRPC

**URL:** <https://www.ruby-forum.com/t/using-camping-with-xmlrpc/116842>\
**Category:** Rails\
**Created:** [October 10, 2007, 10:55am UTC](https://www.ruby-forum.com/t/using-camping-with-xmlrpc/116842 "2007-10-10T10:55:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_WattengSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@Christian\_WattengSS](https://www.ruby-forum.com/u/Christian_WattengSS)\
**Post date:** [October 10, 2007, 10:55am UTC](https://www.ruby-forum.com/t/using-camping-with-xmlrpc/116842/1 "2007-10-10T10:55:38Z")

</div>

I know this group is not for Camping, but I can’t find any good  
alternative 🙂

I’m trying to use the xmlrpc library with camping. And to do that I’m  
trying to only have to initialize the connection once.

## This is my current camping module:

require ‘camping’  
require ‘xmlrpc/client’

Camping.goes :Grabbr

def Grabbr.create  
@server = XMLRPC::Client.new “localhost”, “/the.rpc”  
end

module Grabbr::Controllers  
class Index \< R ‘/’  
def get  
@downloads = @server.call “get\_list”  
render :index  
end  
end  
end

module Grabbr::Views  
def layout  
html do  
body do  
self \<\< yield  
end  
end  
end

def index  
table do

```
  for d in @downloads
    tr do
      td @server.call "get_details ${d}"
    end
  end
end

```

## end end

However it complains that the “server” variable is not availible…

How do I create the “server” object to be globally availible? I have  
tried @ and @@ but it still won’t work.

Christian…
