Part 4: SOAP Client Development with zeep
Working with zeep
Installing zeep
pip install zeep[xmlsec] # xmlsec adds XML signature support for WS-Security (Part 5)pip install zeepBasic Client Setup
# basic_client.py
from zeep import Client
client = Client("http://www.dneonline.com/calculator.asmx?WSDL")
result = client.service.Add(intA=15, intB=27)
print(result) # 42Inspecting Available Operations
Calling Operations and Handling Responses
Simple Types
Complex Nested Types
List Responses
Serialising Responses to Dictionaries
Session Management and Persistent Connections
Caching WSDLs for Production
Debugging: Logging Raw SOAP Traffic
Handling Optional Fields and None Values
Building a Production-Ready Client Class
What's Next
PreviousPart 3: Building SOAP Services with Python and spyneNextPart 5: WS-Security and Authentication
Last updated