[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SOAP and HTTP Basic Auth

Tim Bates

5/12/2005 11:49:00 AM

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.

--
Tim Bates
tim@bates.id.au


2 Answers

NAKAMURA, Hiroshi

5/29/2005 2:05:00 PM

0

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

Hi,

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

Tim Bates wrote:
> 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-----


Kent Sibilev

5/30/2005 12:46:00 AM

0

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

Kent.

On 5/29/05, NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Sorry for the late reply. I don't check ruby-talk too much recently...
>
> Tim Bates wrote:
> > 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-----
>
>