I tried to create a zeep client and use it by two methods.
1) I tried to keep everything in a single module . i created the zeep client object and it was working fine while using a payload. 2) I created a method which returns a zeep client object for a wsdl. I tried to use this a way as method 1) But getting the below error. zeep.exception.Fault : Incoming message could not be authenticated. No valid credentials found Can someone please advise what I am missing here which causes this error. My second approach is like this. \\ def zeepClient(wsdl): ## do all here and return zeep client object. return client #Now in another module I do call that above method like this Client=othermodule.zeepClient(mywsdl) Payload={my payload} Client.service.myservice(**Payload) \\
If I do this , I get above error.But if my above piece of code and my method for zeepClient are all in same place. I am not getting error. Not sure . What that Returned Client object is missing.