[Fedora-suds-list] digest in header (very newbie)

Antonia Valentin antonia.valentin at gmail.com
Wed Oct 19 13:37:29 UTC 2011


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.0.xsd"
soapenv:mustUnderstand="1">
        <wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="UsernameToken-32685187">
            <wsse:Username>nomUsuari</wsse:Username>
            <wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest
">kfKGwLQVEAI98vcQLAqvFcASPSI=</wsse:Password>
            <wsse:Nonce>9LoOwjIQMTA5hkFKOWTk5A==</wsse:Nonce>
            <wsu:Created>2008-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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/suds/attachments/20111019/b2669c04/attachment.html 


More information about the suds mailing list