Forum: Ruby Get Set-Cookie from Soap response

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F54163c791d70dc0c061063c5a5dfafe?d=identicon&s=25 Matthew Sims (poekinoeni)
on 2007-06-27 13:10
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"

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')
97334b75c93574ed3e514f33849f0953?d=identicon&s=25 Mario Ruiz (tcblues)
on 2009-05-08 17:35
I have the same problem, did you solve it?

Matthew Sims wrote:
> Hi,
>
This topic is locked and can not be replied to.