Looking for some help on how to complete the list operation. Code would be something like
client = Client(wsdl, plugins=[history, MyLoggingPlugin()])
client.service.list(?????,????)
Based on this excerpt from the python3 command: python –m zeep wsdl_file :
Global elements:
....
ns0:list(ns0:ListRequest)
....
Global types:
xsd:anyType
....
ns0:BaseFilter(isAscending: xsd:boolean, pageNumber: xsd:int,
recordsPerPage: xsd:int, maxRecordsPerPage: xsd:int)
....
Operations:
....
list(filter: ns0:BaseFilter) -> objectId: ns0:ObjectId[]
....
Digging into the documents I understand that ns0:BaseFilter is a complex element and I will need to use client.get_type
. So with the following code I moved along and getting closer results.
myUserFilter = myBaseFilter(isAscending=True, pageNumber=0)
SendingXML = client.create_message(client.service, 'list', myUserFilter) `
Then the SendingXML looks like this:
<ns0:list xmlns:ns0="http://www.strongmail.com/services/v2/schema">
<ns0:filter>
<ns0:isAscending>true</ns0:isAscending>
<ns0:pageNumber>0</ns0:pageNumber>
</ns0:filter>
</ns0:list>
</soap-env:Body>
I am not sure how to get the additional items on the filter element line/header.
<ns0:filter>
It should be the following (ns0 is missing as this is a sample)
<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="UserFilter">