I need to access a SOAP server with WSDL where the authentication is done by sending two parameters, UserId and AccessToken. I tried this way:
token = UsernameToken(
UserId,
AccessToken
)
token.setnonce()
token.setcreated()
security = Security()
security.tokens.append(token)
client = Client(URL)
client.set_options(wsse=security)
and suds throwed this error
URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
How do I add this parameters to my request? Or am I doing something else wrong?
If the parameters are supposed to part of a header, you can do it that way:
Then do you stuff.