[Fedora-suds-list] Fwd: Setting Value of Extension of types

Garth Bushell garth at garthy.com
Thu Apr 15 12:19:41 UTC 2010


Hi,

I'm Fairly new to using SOAP so this may be stupid but..

There is a type in the Vware Vim api[1] defined as an extension of
xsd:string as below.

<complexType name="ManagedObjectReference">
 <simpleContent>
   <extension base="xsd:string">
     <attribute name="type" type="xsd:string"/>
   </extension>
 </simpleContent>
</complexType>

I believe it is extending the type String and adding an attribute called "type".

Within the Java and C# SOAP wrappers these generate a class with two attributes
 "type" from ManagedObjectReference and "value" from xsd:string.

The Suds call "mor=client.factory.create('ns0:ManagedObjectReference')"
generates a
 object but it seems to be missing the value attribute.

>>> print mor.__keylist__
['_type']

How do I set the value of the xsd:string of the ManagedObjectReference
within suds?

as I can only set the type not the value of the xs:string I'm extending.

Hope this makes sense.

Cheers

Garth


[1] - http://www.vmware.com/support/developer/vc-sdk/


More information about the suds mailing list