Hello @ll, I'm fairly new to SOAP and I've been trying to solve this issue with no succeed so far.
The service administrator asks me for a Username Token with digest password inside the header. I have this example of implementation:
soapenv:Header <wsse:Security xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1...." soapenv:mustUnderstand="1"> <wsse:UsernameToken xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1..." wsu:Id="UsernameToken-32685187"> wsse:UsernamenomUsuari</wsse:Username> <wsse:Password Type=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profi... ">kfKGwLQVEAI98vcQLAqvFcASPSI=</wsse:Password> wsse:Nonce9LoOwjIQMTA5hkFKOWTk5A==</wsse:Nonce> wsu:Created2008-07-23T09:44:42.242Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header>
How can I manage this in Suds?
I've done this code for the auth. part, based on previous emails on this list:
url='http://url.cat?wsdl' client=Client(url) baseurl='http://url.cat/' username='username' password='password' passman=urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, baseurl, username, password) authhandler=urllib2.HTTPDigestAuthHandler(passman) client.options.transport.urlopener=urllib2.build_opener(authhandler)
but I do not know how to manage to include it in the header. I get this error message: suds.WebFault: Server raised fault: 'WSDoAllReceiver: Request does not contain required Security header' Any help would be really appreciate.
Thank you! Antonia Valentin GIS technician
2011. október 19. szerda 15:37:29 dátummal Antonia Valentin ezt írta:
The service administrator asks me for a Username Token with digest password inside the header. How can I manage this in Suds?
Hi, I implemented UsernameToken with digest, you can find my code at GitHub here: https://github.com/dnet/suds (see my mail sent to this list on 21st May 2011 for patch and further details)
Hi András and everybody! I finally get connected with the server thanks to your code.
Thank you very much!
Best, Antònia
On 19 October 2011 16:17, Veres-Szentkiralyi Andras vsza@vsza.hu wrote:
- október 19. szerda 15:37:29 dátummal Antonia Valentin ezt írta:
The service administrator asks me for a Username Token with digest
password
inside the header. How can I manage this in Suds?
Hi, I implemented UsernameToken with digest, you can find my code at GitHub here: https://github.com/dnet/suds (see my mail sent to this list on 21st May 2011 for patch and further details) -- Regards, András Veres-Szentkirályi