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
import sys

username = 'myuser'
password = 'mypass'
urlservicio = 'http://server/wsMisConsumos/CryMiContadorSrv.asmx?WSDL'

cred=(AUTH.httpbasic, username, password )
print urlservicio

        servicio = ServiceProxy(wsdl=urlservicio, auth=cred,  tracefile=sys.stdout)

except HTTPResponse, http:
                print http.status
                print cred

Thanks in advance for your attention.