Python Forum

Full Version: Zeep lib, encrypt soap body
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

i am trying to use: https://python-zeep.readthedocs.io/en/master/wsse.html

Signing msg works fine:

from zeep import Client
from zeep.wsse.signature import Signature

client = Client(
    'http://test?wsdl',
    wsse=Signature("test.pem","test.pem",))

client.service.GetNetworkOperators()
Issue that I need to solve is how to encrypt body part like:

Output:
<Body> <xenc:EncryptedData Id="bodyID"> xenc:CipherData> <xenc:CipherValue>...</xenc:CipherValue> </xenc:CipherData> </xenc:EncryptedData> </Body>
thank you very much for help!
miha