[Soap-Python] Spyne: problems getting complex nested return value definition right
Jussi Rasinmäki
jussi.rasinmaki at simosol.fi
Fri Jul 13 14:57:32 CEST 2012
On Fri, Jul 13, 2012 at 3:34 PM, Burak Arslan
<burak.arslan at arskom.com.tr> wrote:
> On 07/13/12 15:27, Jussi Rasinmäki wrote:
>>
>> But how do I add the InvalidValue-objects to Array(InvalidValue)
>> object?
>
>
>
> see the update.
Ah, right, you meant in the schema.
But wouldn't using this
InvalidValues = Array(InvalidValue)
instead of the more convoluted way of
InvalidValues = InvalidValues
...
InvalidValue = InvalidValue.customize(min_occurs='1',
max_occurs='unbounded')
mean that I can't set the requirement that InvalidValues has to
contain at least one InvalidValue child?
> You should not confuse declarative type markers with class instances.
> Array(InvalidValue) is just a convenient way of letting spyne know that a
> regular list of InvalidValue instances are to be serialized as wrapped
> arrays.
Yes, definitely tripped into that.
Kind regards,
Jussi
More information about the Soap
mailing list