Ich bin ziemlich neu zu Zeep und Seife. Ich versuche, Kundenwunsch zu Seife ws Funktion zu machen. wsdl der Funktion:Erstellen eines Objekts mit Python Zeep
ich verstehe nicht vollständig, wie man ein Objekt mit dem Typ any in Zeep erstellt. Ich habe versucht:
wsdl = 'http://domain/app.asmx?WSDL'
client = Client(wsdl=wsdl)
params = {
'RetailTransactionsParameters': {
'GetNotExportedOnly': '0',
'GetNotRetrunsOnly': '0',
'FromDate': '20170518',
'ToDate': '20170518',
'TransactionTypeFilter': {
'TransactionType': '2'
},
},
}
parameters = client.get_element('ns0:GetRetailTransactions')
param = xsd.AnyObject(parameters, parameters(params))
result = client.service.GetRetailTransactions(param)
aber ich bekomme Fehler:
File "/home/user/lib/python3.6/site-packages/zeep/xsd/elements/indicators.py", line 227, in render
if name in value:
TypeError: argument of type 'AnyObject' is not iterable
auf soapui i Anfrage machen und erfolgreich Antwort bekommen:
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<GetRetailTransactions xmlns="example.com/">
<parameters>
<RetailTransactionsParameters>
<GetNotExportedOnly>0</GetNotExportedOnly>
<GetNotRetrunsOnly>0</GetNotRetrunsOnly>
<FromDate>20170518</FromDate>
<ToDate>20170518</ToDate>
<TransactionTypeFilter>
<TransactionType>2</TransactionType>
</TransactionTypeFilter>
</RetailTransactionsParameters>
</parameters>
</GetRetailTransactions>
</Body>
</Envelope>
vielleicht kann mir jemand führen, wie man Stellen Sie eine solche Anfrage mit Zep. richtig. danke im voraus