# Get Set-Cookie from Soap response

**URL:** <https://www.ruby-forum.com/t/get-set-cookie-from-soap-response/107918>\
**Category:** Ruby\
**Created:** [June 27, 2007, 1:10pm UTC](https://www.ruby-forum.com/t/get-set-cookie-from-soap-response/107918 "2007-06-27T13:10:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![notmatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f6c823/32.png) [@notmatt](https://www.ruby-forum.com/u/notmatt)\
**Post date:** [June 27, 2007, 1:10pm UTC](https://www.ruby-forum.com/t/get-set-cookie-from-soap-response/107918/1 "2007-06-27T13:10:22Z")

</div>

Hi,

I’m a newbie to Ruby but need to do a couple of soap requests over  
https.

I found Soap4r and Http-access2.

I can send the request and receive the response but from our server.

I need to retrieve the Set-Cookie from the HTTP Header in the response,  
I used wiredump\_dev to see the data being sent and received.

Response :  
HTTP/1.1 200 OK

Date: Wed, 27 Jun 2007 09:40:30 GMT

Ext:

Content-Type: text/xml; charset=“utf-8”

Content-Length: 523

Set-Cookie:  
CAAAAA4VUVAQF7XAMKBQ2ZKK2W53MMLDF9YMD2U94B1R1GQFFCNB1542HRGMA4QD

Content-Language: en

Hopefully someone can help me with this issue.  
I’ve attached the basic code I’m using below.

thanks  
Matt

MY CODE:  
require ‘rubygems’  
gem ‘soap4r’  
gem ‘http-access’

require ‘http-access2’  
require ‘soap/rpc/driver’

url = “[https://10.1.1.10:443/desktop](https://10.1.1.10:443/desktop)”

soap = SOAP::RPC::Driver.new(url,“urn:something”)  
soap.wiredump\_dev = STDERR  
soap.options[“protocol.http.ssl\_config.verify\_mode”] = nil

soap.add\_method(‘GetCapabilitiesRequest’)  
puts soap.GetCapabilitiesRequest()

# NEED THE SET-COOKIE FROM ‘AuthenticateInternalPassphrase’ RESPONSE

soap.add\_method(‘AuthenticateInternalPassphrase’, ‘username’,  
‘passphrase’)  
prints soap.AuthenticateInternalPassphrase(‘demouser’, ‘demopass’)

---

<div class="post-metadata">

**Author:** ![notmatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f6c823/32.png) [@notmatt](https://www.ruby-forum.com/u/notmatt)\
**Post date:** [May 8, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/get-set-cookie-from-soap-response/107918/2 "2009-05-08T17:35:17Z")

</div>

I have the same problem, did you solve it?

Matthew Sims wrote:

> Hi,
