suds-py3 icon indicating copy to clipboard operation
suds-py3 copied to clipboard

suds-py3: Headers passed into suds.client.Client() are not used in WSDL and XSD requests

Open Dmitry-Kv opened this issue 4 years ago • 2 comments

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!

Dmitry-Kv avatar Nov 16 '20 11:11 Dmitry-Kv

Can you help create a PR for this fix? Thanks!

cackharot avatar Dec 07 '20 13:12 cackharot

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. :/

k3yma avatar Jan 29 '21 11:01 k3yma