[spyne] Mandatory not being enforced

Joseph L. Casale jcasale at activenetwerx.com
Fri Jun 13 16:04:28 UTC 2014

I have am using @rpc to decorate a service method with an object that has
_type_info as follows:

    _type_info = [
        ('xxx', Mandatory(ID)),

ID points to a class as below.

class ID(ComplexModel):
    _type_info = [
        ('ID', Mandatory(XmlAttribute(Unicode(pattern=some_pattern))))

A request can still get posted with an xml element <xxx/> not containing the
ID attribute, is there a better way to setup this requirement?


More information about the people mailing list