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’)