A
A
andreyaleksukhin2018-08-22 18:21:10
Python
andreyaleksukhin, 2018-08-22 18:21:10

Python zeep how to generate AnyType object?

I use zeep to interact with SOAP API.
One of the methods accepts (xs:int NeedList, xs:string SessionToken, xs:anyType TariffParameters) an object of type AnyType, which obviously is not described in the XSD. In this case, you need to put a lot of nested parameters into the object. All attempts so far ended with the transfer of either an xml string, in the form

<TariffParameters>\&lt;tag\&gt;value\&lt;\tag\&gt;</TariffParameters>

or in the form of structures of type dict
<TariffParameters>{ 'Constructed': '2014-01-01', 'Model': '3251066103',}</TariffParameters>

etc.
The goal is to pass the correct XML format to TariffParameters. How to do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question