SOAP4R newbie question

Hi NaHi,

Thanks for responding …

Isn’t the service a kind of “logging-in with user/passwd to get a session
token then passing the token with all methods”, is it?

My initial understanding of this particular soap service was wrong, it does
not use cookies. It works how you describe above except that rather than
sending the token as a parameter to each method it sends it in the SOAP
Header.

Does soap4r support adding complex types (in this case a simple object with
just a string id) to the SOAP Header?

If not, is there an easy way to extend Driver to add a header, as I really
like the way methods are added to the driver, its so neat and so ruby … :wink:

BTW, I’m using ruby/1.8.1 + bundled soap module

p.

···

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.

Hi,

From: “Allton, Paul” Paul.Allton@DrKW.com
Sent: Friday, March 12, 2004 7:26 PM

not use cookies. It works how you describe above except that rather than
sending the token as a parameter to each method it sends it in the SOAP
Header.

Does soap4r support adding complex types (in this case a simple object with
just a string id) to the SOAP Header?

Sort of, with soap4r/CVS code at
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/soap4r/ .
Sample server and client are at
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/soap4r/sample/soap/authheader/ .
The sample client sends userid/passwd via SOAP Header, receives
token via SOAP Header, and sends the token in the SOAP Header.
“Passing all authentication information on SOAP Header” model
(maybe slightly different from your service).

SOAP::Header::SimpleHeaderHandler handles SOAP Header
through Hash. You can pass a Hash of a Hash of … so you can send
and receive some kind of “complex type” XML element. If it’s not
enough, you must use bare SOAP::Header::Handler.

Would you try soap4r/CVS code at your leisure?

Regards,
// NaHi