Digest MD5 authentication over using ZSI

Jakob Simon-Gaarde jsgaarde at gmail.com
Wed Sep 21 04:26:21 EDT 2005


Just for the record. After accepting that pythons build-in digest
authentication (HTTPDigestAuthHandler)  does *NOT* work, I made my own
digest authentication handler and built it into ZSI, they have recieved
and accepted the patch so it should be part of the next ZSI release
(current 1.7).

I have tested the implementation with Microsoft MapPoint services,
seems OK:

#-------------------------------------
#Usage example (MapPoint SOAP Services):
#-------------------------------------
from CommonService_services import *
loc = FindServiceLocator()
import sys
import ZSI
kw={'tracefile':sys.stdout, 'auth' : (
ZSI.AUTH.httpdigest, 'username', 'passwd') }
portType = loc.getFindServiceSoap(**kw)

AddressLine='Lergravsvej 28'
PostalCode='8660'
CountryRegion='DK'
InputAddress = ns1.Address_Def()
InputAddress._AddressLine = AddressLine
InputAddress._PostalCode = PostalCode
InputAddress._CountryRegion = CountryRegion

specification = ns1.FindAddressSpecification_Def()
specification._InputAddress = InputAddress
specification._DataSourceName = 'MapPoint.EU'
request = FindAddressSoapInWrapper()

request._specification = specification

res = portType.FindAddress(request)
#-----------------------------------------

Best regards 
Jakob Simon-Gaarde




More information about the Python-list mailing list