[Soap-Python] Soap Enum type problem

Burak Arslan burak.arslan at arskom.com.tr
Sun Apr 5 23:32:22 CEST 2015


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


More information about the Soap mailing list