PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > soap4r with digest authentication
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
soap4r with digest authentication

Réponse
 
LinkBack Outils de la discussion
Vieux 11/05/2008, 18h27   #1
Ryan Q.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut soap4r with digest authentication

Hello all,

I've been trying to get digest authentication working for soap calls for
two weeks now. All the examples I find seem to be flawed. Here's the
code that I'm using which is right out of the httpclient docs.

require 'httpclient'
require "soap/wsdlDriver"
require 'soap/rpc/driver'
require 'uri'

user = "admin"
pass = "pass"
wsdl = "http://someserver/file.wsdl"

driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_drive r
driver.instance_methods
driver.options["protocol.http.digest_auth"] <<
['http://someserver/SoapServer.php', user, pass]

info = driver.GetSystemInformation('')
puts info

I've changed the server url because I don't want to expose it's
location.

The error I get is:
c:/ruby/lib/ruby/1.8/soap/property.rb:269:in `check_lock': cannot add
any key to locked property (TypeError)
from c:/ruby/lib/ruby/1.8/soap/property.rb:192:in
`local_referent'
from c:/ruby/lib/ruby/1.8/soap/property.rb:230:in `referent'
from c:/ruby/lib/ruby/1.8/soap/property.rb:106:in `[]'
from C:/Documents and Settings/Administrator/Desktop/mxpua.rb:19

The line numbers in mxpua.rb won't match up, but I'm sure you guys see
where it's failing.

Any with this would be great. I can't understand how all the
examples I find would all be wrong, but they all seem to use the same
process to add the digest auth information to the object.

Thanks for your .

-Ryan
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 13/05/2008, 20h52   #2
Ryan Q.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: soap4r with digest authentication

Anyone? I'd really appreciate the .
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 13/05/2008, 20h58   #3
Phillip Gawlowski
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: soap4r with digest authentication

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

Ryan Q. wrote:
| Anyone? I'd really appreciate the .

Wild guess: You are using SSL where you shouldn't, or you aren't using
SSL where you should?

Can't be of more , though.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

~ "Summer is butter on your chin and corn mush between every tooth."
- -Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgp8t8ACgkQbtAgaoJTgL8zOgCdG/VS4j6iJaOoB4VahLVoeygq
2nYAmwYCHZYq5e0iX8Z0Dl0S5g2OUKXm
=rwPh
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 13/05/2008, 23h02   #4
Ryan Q.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: soap4r with digest authentication

Phillip,

SSL shouldn't be a factor here. The service I'm trying to access is
clear-text http. Just using digest authentication.

The error that I'm getting in Ruby looks to be that I can't modify the
'driver' object once it's been created.

I'm guessing that there is either a way to pass those options as the
object is getting created or there is a different syntax to modify the
object after it's been created, but before the SOAP call gets sent.

Thanks,
Ryan
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 16/08/2008, 21h17   #5
Sb Po
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: soap4r with digest authentication

Hello,

I have a bit of information, if you are still working on this.

I believe this line
>>driver.options["protocol.http.digest_auth"]


should really be
>>driver.options["protocol.http.auth"]


If the server accepts basic authentication, that will be used.
If the server accepts digest authentication, that will be used.

I send authentication information to the server in both cases,
but only the first option (basic) is accepted by the server.

I would like to know if it works for you now?

Soren







Ryan Q. wrote:
> Hello all,
>
> I've been trying to get digest authentication working for soap calls for
> two weeks now. All the examples I find seem to be flawed. Here's the
> code that I'm using which is right out of the httpclient docs.
>
> require 'httpclient'
> require "soap/wsdlDriver"
> require 'soap/rpc/driver'
> require 'uri'
>
> user = "admin"
> pass = "pass"
> wsdl = "http://someserver/file.wsdl"
>
> driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_drive r
> driver.instance_methods
> driver.options["protocol.http.digest_auth"] <<
> ['http://someserver/SoapServer.php', user, pass]
>
> info = driver.GetSystemInformation('')
> puts info
>
> I've changed the server url because I don't want to expose it's
> location.
>
> The error I get is:
> c:/ruby/lib/ruby/1.8/soap/property.rb:269:in `check_lock': cannot add
> any key to locked property (TypeError)
> from c:/ruby/lib/ruby/1.8/soap/property.rb:192:in
> `local_referent'
> from c:/ruby/lib/ruby/1.8/soap/property.rb:230:in `referent'
> from c:/ruby/lib/ruby/1.8/soap/property.rb:106:in `[]'
> from C:/Documents and Settings/Administrator/Desktop/mxpua.rb:19
>
> The line numbers in mxpua.rb won't match up, but I'm sure you guys see
> where it's failing.
>
> Any with this would be great. I can't understand how all the
> examples I find would all be wrong, but they all seem to use the same
> process to add the digest auth information to the object.
>
> Thanks for your .
>
> -Ryan


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h13.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15020 seconds with 13 queries