我有这项服务:
class CategoryService(ServiceBase):
@rpc(Array(Integer(min_occurs=1, max_occurs='unbounded', nillable=False), **MANDATORY),
_returns=Iterable(Category, **MANDATORY))
def get_subcategories_by_path(ctx, category_path):
...
这在 WSDL 中显示为:
<xs:complexType name="get_subcategories_by_path">
<xs:sequence>
<xs:element name="category_path" type="tns:integerArray"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="integerArray">
<xs:sequence>
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xs:sequence>
</xs:complexType>
我希望category_path
参数是 1 个或多个整数的数组,但Array(Integer(min_occurs=1, max_occurs='unbounded', nillable=False)
对我不起作用。