[Soap-Python] Spyne: problems getting complex nested return value definition right

Jussi Rasinmäki jussi.rasinmaki at simosol.fi
Fri Jul 13 15:24:18 CEST 2012


On Fri, Jul 13, 2012 at 4:15 PM, Burak Arslan
<burak.arslan at arskom.com.tr> wrote:
> On 07/13/12 15:57, Jussi Rasinmäki wrote:
>>
>> 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?
>
>
>
> Just do Array(InvalidValue.customize(min_occurs=1))

Yes, of course...

> If you leave max_occurs of a class inside Array() alone, it's set to
> infinity. If you set it to something else, it's left untouched.
>
> I'd think this'd be obvious. Any suggestions as to how I can improve spyne
> docs on this matter?

It indeed is obvious when you stop to think for a while. Although that
tends to happen all too rarely ;-)

An improvement to the documentation could be a ComplexModel example
that actually generates the response object. The current example is
just passing back whatever it got from the client. Hence my troubles
generating the response object. The information, if not an actual
example of all different variations, of different ways of defining the
schema is already there.

Kind regards,
Jussi


More information about the Soap mailing list