SOAP and HTTP Basic Auth

T

Tim Bates

Hi folks,
I want to access a WSDL/SOAP resource that's protected by HTTP Basic
Authentication. I currently get 401 errors when I try to access it.
Searching the source code for the soap module in the stdlib seems to
indicate that it supports it, but the module is undocumented and I can't
figure out where to specify my username and password. Can anyone who's
familiar with the soap module (NaHi?) point me in the right direction?

Please CC me on your reply.

Tim.
 
N

NAKAMURA, Hiroshi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Sorry for the late reply. I don't check ruby-talk too much recently...

Tim said:
I want to access a WSDL/SOAP resource that's protected by HTTP Basic
Authentication. I currently get 401 errors when I try to access it.
Searching the source code for the soap module in the stdlib seems to
indicate that it supports it, but the module is undocumented and I can't
figure out where to specify my username and password. Can anyone who's
familiar with the soap module (NaHi?) point me in the right direction?

There's a sample in test/soap/test_streamhandler.rb (it should also be
in sample directory).

drv = SOAP::RPC::Driver.new(...)
drv.options["protocol.http.basic_auth"] << ["http://foo/bar",
"username", "passwd"]
drv.service(...)

Just ignore if it's too late. Apologize again.

Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFCmcvMf6b33ts2dPkRAkaiAJ0VkpvVQVsdVsyJH2n8VLsDAHSrBQCdGYCY
5ot3vBRrkDo9m27U3h/qUwg=
=Y0ju
-----END PGP SIGNATURE-----
 
K

Kent Sibilev

Is there any way to initialize WSDLFactory with a wsdl file protected
by basic authentication?

Kent.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
=20
Hi,
=20
Sorry for the late reply. I don't check ruby-talk too much recently...
=20
Tim said:
I want to access a WSDL/SOAP resource that's protected by HTTP Basic
Authentication. I currently get 401 errors when I try to access it.
Searching the source code for the soap module in the stdlib seems to
indicate that it supports it, but the module is undocumented and I can'= t
figure out where to specify my username and password. Can anyone who's
familiar with the soap module (NaHi?) point me in the right direction?
=20
There's a sample in test/soap/test_streamhandler.rb (it should also be
in sample directory).
=20
drv =3D SOAP::RPC::Driver.new(...)
drv.options["protocol.http.basic_auth"] << ["http://foo/bar ",
"username", "passwd"]
drv.service(...)
=20
Just ignore if it's too late. Apologize again.
=20
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
=20
iD8DBQFCmcvMf6b33ts2dPkRAkaiAJ0VkpvVQVsdVsyJH2n8VLsDAHSrBQCdGYCY
5ot3vBRrkDo9m27U3h/qUwg=3D
=3DY0ju
-----END PGP SIGNATURE-----
=20
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,478
Latest member
ReginaldVi

Latest Threads

Top