you need to activate basic authentication.

auth.settings.allow_basic_login = True

usually do this in models/db.py

see 
https://do.growthpath.com.au/book/default/search/29?search=basic+authentication



On Tuesday, 18 March 2014 08:02:37 UTC+11, piero crisci wrote:
>
> Hello i am trying to connect to this wsdl: 
> http://docway.demo.3di.it/3diws/services/eXtraWay?wsdl 
> It requires http basic authentication  and i am using pysimplesoap 1.10 
> and i tried this configuration:
>
> from pysimplesoap.client import SoapClient
> location_wsdl = "http://docway.demo.3di.it/3diws/services";
> wsdl = "http://docway.demo.3di.it/3diws/services/eXtraWay?wsdl";
> client = SoapClient(location = 
> location_wsdl,sessions=True,http_headers={'username': 'admin', 'password': 
> 'xxxx'},username='admin',password='xxxxxx')
>
> I got this error
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "build\bdist.win32\egg\pysimplesoap\client.py", line 133, in 
> __init__
>   File "build\bdist.win32\egg\pysimplesoap\client.py", line 469, in 
> wsdl_parse
>   File "build\bdist.win32\egg\pysimplesoap\helpers.py", line 71, in fetch
>   File "build\bdist.win32\egg\pysimplesoap\transport.py", line 121, in 
> request
>   File "C:\python27\lib\urllib2.py", line 406, in open
>     response = meth(req, response)
>   File "C:\python27\lib\urllib2.py", line 519, in http_response
>     'http', request, response, code, msg, hdrs)
>   File "C:\python27\lib\urllib2.py", line 444, in error
>     return self._call_chain(*args)
>   File "C:\python27\lib\urllib2.py", line 378, in _call_chain
>     result = func(*args)
>   File "C:\python27\lib\urllib2.py", line 527, in http_error_default
>     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> urllib2.HTTPError: HTTP Error 401: Unauthorized
>
> It seems like the basic authenitcation is not supported. am I wrong?
> How i need to change the wsdl call? And how i can use a session to send 
> different call?
> Thx for help!
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to