Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_client():
- t = suds.transport.https.HttpAuthenticated(username=user, password=password)
- try:
- return suds.client.Client(url, transport=t, )
- except Exception, e:
- print e
- def get_ws_client():
- client = suds.client.Client(url )
- security = suds.wsse.Security()
- token = suds.wsse.UsernameToken(user, password)
- security.tokens.append(token)
- client.set_options(wsse=security)
- return client
Add Comment
Please, Sign In to add comment