[Soap-Python] WSSE security

Iuri iurisilvio at gmail.com
Mon Apr 27 19:13:57 CEST 2015


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 at 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 <ptomblin at xcski.com> 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
> Soap at python.org
> https://mail.python.org/mailman/listinfo/soap
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20150427/642f95c5/attachment-0001.html>


More information about the Soap mailing list