Created
October 30, 2017 04:34
-
-
Save isidroamv/2bf2b2c6ebb53e0ad667024cd30cadc8 to your computer and use it in GitHub Desktop.
Make a SOAP Authentication with UsernameToken using python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zeep import Client | |
from zeep.transports import Transport | |
from zeep.wsse.username import UsernameToken | |
import json | |
url = "https://example.com/Service.svc?wsdl" | |
client = Client(url, wsse=UsernameToken("username", "password")) | |
reponse = client.service.MyService(request={"CountryCode": "MEX", "ClientCode": 0000}) | |
print("reponse", reponse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment