Hello,
I am using ZSI (version 2.0 I suppose) wsdl2py to generate web service stub
classes. I am able to call the webservice in an environment where no http
proxies are involved.
But when a http proxy comes into picture, socket error is thrown saying proxy timed out. I browsed through ZSI code. There is file client.py which is called from the generated stub classes which uses httplib.
I have changed the client.py and digest_auth.py from the ZSI package for handling proxies. The diff files are attached.
Below is the sample client side code which uses these. It works for basic authentication. I could not check it for proxies which support digest authentication
from SesameService_services import *
from ZSI.auth import AUTH
locator = SesameServiceLocator()
kw = {'proxyurl':"http://proxy.mycomp.com:8080", \
'proxyauth':(AUTH.httpbasic, 'user-name',
'password')}
port = locator.getSesame(None, **kw)
request = SesameRequest()
request._name = "m31"
response = port.Sesame(request)
print response._return
Regards,
Vivek
client.py file diff for supporting HTTP proxy
Logged In: YES
user_id=1739322
Originator: YES
File Added: digest_auth.diff
digest_auth.py diff file for supporting HTTP proxy