Hello to all members.
How is the right way to pass credentials for a web service cliente using ZSI Service Proxy.
I have the following client, and it keeps returning HTTP 401 code:
from ZSI.ServiceProxy import ServiceProxy
from ZSI.auth import AUTH
from ZSI.wstools.Utility import HTTPResponse
username = 'myuser'
password = 'mypass'
urlservicio = 'http://server/wsMisConsumos/CryMiContadorSrv.asmx?WSDL'
cred=(AUTH.httpbasic, username, password )
servicio = ServiceProxy(wsdl=urlservicio, auth=cred, tracefile=sys.stdout)
except HTTPResponse, http:
Thanks in advance for your attention.
Log in to post a comment.