# Newbie

**URL:** <https://www.ruby-forum.com/t/newbie/64807>\
**Category:** Ruby\
**Created:** [February 8, 2006, 11:19pm UTC](https://www.ruby-forum.com/t/newbie/64807 "2006-02-08T23:19:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 8, 2006, 11:19pm UTC](https://www.ruby-forum.com/t/newbie/64807/1 "2006-02-08T23:19:50Z")

</div>

Hi all, hope this is the right place …

I just started learning Ruby and as my first project I’m trying to  
migrate  
a web front-end for [SalesForce.com](http://SalesForce.com) that was written in PHP. The old PHP  
site used SOAP to interact with [SalesForce.com](http://SalesForce.com) and that seems to work  
great so I figure I’d start hunting around for docs to see if anyone  
else  
had done the leg work (no point in reinventing the wheel and all).

I didn’t find anything on SOAP and the docs were cryptic to me  
(remember,  
I’m still learning this stuff). I did run across one site that used  
XMLRPC rather than SOAP so I decided to give that a try.

When you connect/login to [SalesForce.com](http://SalesForce.com) they send you a session\_id that  
needs to be placed in the HTTP header as a cookie. When I go to set it  
in  
the XMLRPC object:

server = XMLRPC::Client.new(host, path)  
server.cookie = result[‘session\_id’]

I’m getting the following error:

./sforce.rb:100:in `reinitialize_server': undefined method `cookie’ for  
#XMLRPC::Client:0x2beaf18 (NoMethodError)

I checked the XMLRPC class (which seems to come with Ruby) and it has an  
attr\_accessor for :cookie as well as a cookie variable in the initialize  
method and yet I can’t set/get it. I could really use a pointer in the  
right direction here, I feel like I’m spinning my wheels.

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 9, 2006, 12:53am UTC](https://www.ruby-forum.com/t/newbie/64807/2 "2006-02-09T00:53:31Z")

</div>

On Feb 8, 2006, at 5:19 PM, removed\_email\_address@domain.invalid wrote:

> has an

Well I don’t know much (if anything) about XMLRPC or SOAP, but if you  
want to try to work with the SOAP interface, this will probably help:  
[http://dev.ctor.org/soap4r](http://dev.ctor.org/soap4r)
