RE: web services and dealing with before_filter

case anyone is interested:

Ok, this is odd. The sample Ruby client I provided works fine, i.e.
the session data is retained after the call to login.Login.

However, this sample Perl client does not retain the session data:

use strict;
use warnings;
use Frontier::Client;

my $url = “http://localhost:3000/webservice/api”;
my $client = Frontier::Client->new(url=>$url) or die $!;

$client->call(‘login.Login’, ‘user’, ‘XXX’);
print $client->call(‘hardware.FindHardwareById’, 2), “\n”;
print $client->call(‘hardware.GetAllHardware’);

Why would session data be retained with the Ruby code but
not the Perl code?

This is Ruby 1.8.4, Webrick, Windows XP Pro, btw.



This communication is the property of Qwest and may contain confidential
privileged information. Unauthorized use of this communication is
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and
all copies of the communication and any attachments.

Ruby’s xmlrpc library knows how to handle cookies. But this
functionality is
required neither by xmlrpc spec nor by soap spec. For interoperability
purposes I’d recommend sending username and password with each request.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs