How to create arrayType for WSDL in Python (using suds)?

后端 未结 3 758

Environment:

  • Python v2.6.2
  • suds v0.3.7

The WSDL (server) I work with, have the following schema sub-sections (I tried to w

3条回答
  •  生来不讨喜
    2021-02-04 19:35

    For this type of structure I set an attribute called 'item' on the array object and then append the list member to it. Something like:

    itineraryArray = self.client.factory.create('itineraryArray')
    itineraryArray.item = [itinerary0]
    

    Which parses and passes in fine, even for complex calls with multiple levels.

提交回复
热议问题