[Soap-Python] Soap Enum type problem
Patricio Stegmann Gmail
kpoman at gmail.com
Tue Apr 14 20:03:57 CEST 2015
Hey Burak, I did as you suggested, as it was nonsense trying to create a
type Enum of ints instead of an int restriction !
On 05/04/2015 18:32, Burak Arslan wrote:
> hi,
>
> On 04/02/15 21:12, Patricio Stegmann Hotmail wrote:
>> Hello,
>> I need to implement via spyne something responding to the following type:
>>
>> <xs:complexType name="SomeSpecificTypeEnum">
>> <xs:sequence>
>> <xs:element name="returnValue">
>> <xs:simpleType>
>> <xs:restriction base="xs:int">
>> <xs:enumeration value="0" />
>> <!-- ok -->
>> <xs:enumeration value="1" />
>> <!-- running -->
>> <xs:enumeration value="2" />
>> <!-- aborted -->
>> <xs:enumeration value="3" />
>> <!-- error -->
>> </xs:restriction>
>> </xs:simpleType>
>> </xs:element>
>> <xs:element name="msg" type="xs:string" minOccurs="0"
>> maxOccurs="1"/>
>> </xs:sequence>
>> </xs:complexType>
>>
>> However Spyne only allows string litterals for Enum type. Is there
>> some workaround ?
>>
> What did you already try? It seems Integer(values=[0,1,2,3]) is what you
> need but I can't be sure.
>
>> Thank you !
>
> No problem!
>
> Best,
> Burak
> _______________________________________________
> Soap mailing list
> Soap at python.org
> https://mail.python.org/mailman/listinfo/soap
More information about the Soap
mailing list