[Soap-Python] Soap Enum type problem

Patricio Stegmann Hotmail kpoman at hotmail.com
Thu Apr 2 20:12:25 CEST 2015


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 ?

Thank you !


More information about the Soap mailing list