Forum: Ruby on Rails RE: web services and dealing with before_filter

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.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Berger, Daniel (Guest)
on 2006-05-03 18:57
(Received via mailing list)
Ah, thanks Kent.

Maybe I'll tinker with the session storage options instead.

Regards,

Dan

	-----Original Message-----
	From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Kent Sibilev
	Sent: Monday, May 01, 2006 10:50 AM
	To: rails@lists.rubyonrails.org
	Subject: Re: [Rails] web services and dealing with before_filter


	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.

	Kent.


	On 5/1/06, Berger, Daniel <Daniel.Berger@qwest.com> wrote:

		> -----Original Message-----
		> From: rails-bounces@lists.rubyonrails.org
		> [mailto:rails-bounces@lists.rubyonrails.org ] On
Behalf Of
		> Berger, Daniel
		> Sent: Monday, May 01, 2006 9:58 AM
		> To: rails@lists.rubyonrails.org
		> Subject: RE: [Rails] web services and dealing with
before_filter
		>
		>
		> Here's how I ultimately decided to deal with this
issue in
		> case anyone is interested:

		<snip>

		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.

		Regards,

		Dan


		This communication is the property of Qwest and may
contain confidential or
		privileged information. Unauthorized use of this
communication is strictly
		prohibited and may be unlawful.  If you have received
this communication
		in error, please immediately notify the sender by reply
e-mail and destroy
		all copies of the communication and any attachments.
		_______________________________________________
		Rails mailing list
		Rails@lists.rubyonrails.org
		http://lists.rubyonrails.org/mailman/listinfo/rails





	--
	Kent
	---
	http://www.datanoise.com
This topic is locked and can not be replied to.