0

This is the first time I am getting with soap (Ruby's soap4r). I am trying to develop and plugin for vShpere Client. (ruby sdk http://communities.vmware.com/thread/162318).

I would like to know how I can set a cookie for a SOAP request ?

Prakash Raman
  • 13,319
  • 27
  • 82
  • 132
  • This is very similar to your other question: http://stackoverflow.com/q/4920098/128421 so see that question for an answer. – the Tin Man Feb 07 '11 at 15:41

1 Answers1

0

Found a way to do it.

driver = SOAP::RPC::Driver.new('x','y','c')
cookies = driver.streamhandler.client.cookie_manager.cookies
cookie = cookies[0]
cookie.value = <value>

That does it, it might be a bad hack, but works reliably enough.

Prakash Raman
  • 13,319
  • 27
  • 82
  • 132