suds-py3
suds-py3 copied to clipboard
suds-py3: Headers passed into suds.client.Client() are not used in WSDL and XSD requests
Hi, friends! Fix the problem from the title please. See this problem for suds
Here is my code for example:
wsdl = 'http://10.77.42.63:8081/ua/wsdl/UnifiedApi.wsdl'
url = 'http://10.77.42.63:8081/ua/soap'
client = Client(wsdl,location=url,username='usr',password='pswd',headers={"foo": "bar"})
Request parameters in ...\Python\Python38\Lib\site-packages\suds\transport\http.py def open(self, request):
URL:http://10.77.42.63:8081/ua/wsdl/UnifiedApi.wsdl HEADERS: {'Authorization': 'Basic dXNyOnBzd2Q='} MESSAGE: None
So header {"foo": "bar"} was lost.
For my exe-program I solved the problem by forcibly adding header in the same http.py: headers ['foo'] = 'bar'
Thanks!
Can you help create a PR for this fix? Thanks!
Also hitting this issue. I have a web service I wish to use which requires calling a login service then passing the result of that to subsequent calls. Unfortunately after getting the cookie the above issue makes it impossible to call any of the authenticated services. I'm a novice Python user so wouldn't really know where to begin on fixing it as a PR sorry. :/