Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dmitry-Kv opened this issue Nov 16, 2020 · 2 comments

Comments

@Dmitry-Kv
Copy link

Dmitry-Kv commented Nov 16, 2020

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!

@cackharot
Copy link
Owner

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

@k3yma
Copy link

k3yma commented Jan 29, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants