[web2py] Re: soap client with windows NTLM authorization

2015-06-10 Thread Pengfei Yu
I am able to modify the code in transport.py and enable NTLM authentication using PycURL. But the pycurl library or the inside libcurl is not friendly with SOAP request using NTLM authentication, it always send request with invalid content-length, although it is already correctly specified in

[web2py] Re: soap client with windows NTLM authorization

2015-06-09 Thread Pengfei Yu
Thanks for your reply! I used the proxy because I checked from the source code that proxy is the only place I can pass my username and password to pycurl from SoapClient class. I can connect to this SOAP service directly with pycurl using the code you provided. But I want to create a

[web2py] Re: soap client with windows NTLM authorization

2015-06-09 Thread Derek
alright, well you are going to have to modify the client.py for pysimplesoap then in order to achieve this. I'd suggest you add a variable to the class like 'USERPWD' and populate it. Take a look at lines 75+. See all those 'setopt' calls? Add in your own for HTTPAUTH and USERPWD ... On

[web2py] Re: soap client with windows NTLM authorization

2015-06-08 Thread Pengfei Yu
Hi Derek, Thanks for your reply! I saw similar source code as well. But there is no document how to set it up using pysimplesoap. Could you provide an example? I tried to use following, but it cannot work. import sys,time sys.path.append(/home/www-data/web2py) import pprint from

[web2py] Re: soap client with windows NTLM authorization

2015-06-08 Thread Derek
a simple monkey patch will do you. I would suggest you don't import into the base namespace though. import gluon.contrib.pysimplesoap.client as ssClient then do the monkey... ssClient.Http = set_http_wrapper(library='pycurl') and use it like normal. I don't get why you are trying to use a

[web2py] Re: soap client with windows NTLM authorization

2015-06-08 Thread Derek
looks like pycurl is supported by pysimplesoap. That supports NTLM. See line 67. https://code.google.com/p/pysimplesoap/source/browse/pysimplesoap/client.py?r=6ed06397b4f0c1894156ee5d0a1c165f80ed6a68 On Monday, June 8, 2015 at 7:28:39 AM UTC-7, Pengfei Yu wrote: Hi, I am trying to access a