Topic
No replies
SystemAdmin
SystemAdmin
39 Posts
ACCEPTED ANSWER

Pinned topic WSDL schema types and python types

‏2003-11-23T09:43:03Z |
Hi all.
I posted this at Nov-10 in SOAPpy mailing list and forum, but no luck there...
I came upon your article, and thought (hoped, prayed, ...) that one of you gurus have the answer...

I am Using 0.10.4 on redhat6, and python2.2

I am developing a set of services for the management of a network device. The WSDL-ss are gSoap-generated.

gsoap encodes C enums as restricted xsd:strings;
e.g. enum e_SNMPVersion { e_V1=1, e_V2c=2, e_V1nV2c=3, } ;
is WSDEL-ed as:
"
simpleType name="e-SNMPVersion"
restriction base="xsd:string"
enumeration value="e-V1" /
enumeration value="e-V2c" /
enumeration value="e-V1nV2c" /
/restriction
/simpleType
"
(Note that each line is enclosed within "<">", but I erased them here because preview eliminated the WSDL altogether)

when accessed in python, passing a simple string value (e.g. "e-V1") fails (type mismatch...).

There is probably a missing link in my python client.
I should probably implement some type inherited from some SOAPpy Types.something which provides that restriction and pass it as a parameter instead.

How is this done ? / where is this documented ? / Does this have anything to do with ZSI typecodes ?

Thank you for you time and attention.
Rama