From: "Allton, Paul" Date: 2004-03-11T19:31:16+09:00 Subject: SOAP4R newbie question Just started playing with SOAP4R and its very cool. I'm trying to access a service that requires users to logon before doing stuff, my first effort was as follows: require 'soap/rpc/driver' base = 'http://foo.bar.com/services/' logon_service = SOAP::RPC::Driver.new(base + 'LogonService?wsdl', nil) logon_service.add_method('login', 'username', 'password') logon_service.login('foo', 'bar') do_stuff_service = SOAP::RPC::Driver.new(base + 'DoStuffService?wsdl', nil) do_stuff_service.add_method('getThing') do_stuff_service.getThing() This logs in to the first service okay, but calls to DoStuffService fail with 'not logged in'. I assume this is because the login/session details are maintained by cookies and so I need to invoke both services from the same driver. Something like: single_service = SOAP::RPC::Driver.new(base, nil) single_service.add_method('login', 'username', 'password') Single_service.add_method('getThing') I just cant figure out how to tell each method to use which service (i.e.. namespace) ... Should I be using add_method_with_soapaction? Or is it restricted to one service/namespace per driver? -------------------------------------------------------------------------------- The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. --------------------------------------------------------------------------------