in reply to SOAP::Lite and HTTP::Cookies

After some experimenting and digging through various modules, I couldn't make the HTTP::Cookies thing work either. However, the following code sends the cookie (according to a trace from ethereal), so should hopefully do what you want:-

#! perl use strict; use warnings; use SOAP::Lite; use HTTP::Headers; my $hdr = HTTP::Headers->new( Cookie => "session=my_session_id", ); print SOAP::Lite -> uri('http://www.soaplite.com/Temperatures') -> proxy('http://services.soaplite.com/temper.cgi', default_headers => $hdr, ) -> f2c(100) -> result;

Replies are listed 'Best First'.
Re^2: SOAP::Lite and HTTP::Cookies
by habit_forming (Monk) on Aug 24, 2005 at 20:58 UTC
    Thank you for the reply but actually, that doesn't work. I have solved it though. I am using GLOBs/function references and intercepting the calls to SOAP::Transport::HTTP::Client::send_receive and inserting a "Cookie" parameter directly to HTTP::Headers ref that is being passed in.

    --habit