I'm using suds-jurko [1] with soap_wsse [2] for this. It is simple. I never tried pysimplesoap.
from soap_wsse.suds_plugin import WssePlugin from suds.client import Client from suds.wsse import Security, UsernameToken, Timestamp url = "http://example.com/service?WSDL" username = "test" password = "p@ssw0rd!" certificate = "/your/cert.pem" s = Security() s.tokens.extend([UsernameToken(username, password), Timestamp()]) client = Client(url, plugins=[WssePlugin(certificate)]) client.set_options(wsse=s) [1] https://pypi.python.org/pypi/suds-jurko [2] https://pypi.python.org/pypi/soap_wsse Cheers! On Mon, Apr 27, 2015 at 12:06 PM, Paul Tomblin <[email protected]> wrote: > I need to talk to a web service that requires wsse:BinarySecurityToken, > ds:Security, wsse:UsernameToken and wsu:Timestamp headers. I see that the > latest version of pysimplesoap on python.org has some sort of plugin > architecture and a wsse.py for at least some of these headers, but I don't > see any documentation on how to use them. The Google Code page doesn't have > the wsse.py file, and so obviously nothing in their Wiki. > > Can somebody point me to documentation or examples? > > > -- > http://www.linkedin.com/in/paultomblin > http://careers.stackoverflow.com/ptomblin > > _______________________________________________ > Soap mailing list > [email protected] > https://mail.python.org/mailman/listinfo/soap > >
_______________________________________________ Soap mailing list [email protected] https://mail.python.org/mailman/listinfo/soap
