problem with complex type
Ivan R. Judson
judson at mcs.anl.gov
Wed Nov 17 12:38:11 CST 2004
I am getting this error:
Traceback (most recent call last):
File "C:\software\AccessGrid\tmp\client.py", line 24, in ?
msg = port.AddVenue(avr)
File "C:\software\AccessGrid\tmp\VenueServer_services.py", line 66, in
AddVenu
e
response = self.binding.Send(None, None, request,
soapaction="urn:#AddVenue"
, **kw)
File "C:\software\Python23\Lib\site-packages\ZSI\client.py", line 188, in
Send
sw.serialize(obj, tc, typed=0)
File "C:\software\Python23\Lib\site-packages\ZSI\writer.py", line 74, in
seria
lize
typecode.serialize(self, pyobj, **kw)
File "C:\software\Python23\Lib\site-packages\ZSI\TCcompound.py", line 153,
in
serialize
self.cb(sw, pyobj, **kw)
File "C:\software\Python23\Lib\site-packages\ZSI\TCcompound.py", line 189,
in
cb
raise Exception('Serializing %s.%s, %s %s' %
Exception: Serializing VenueDescription
xmlns="http://www.accessgrid.org/2004"._
ConnectionList, AttributeError 'list' object has no attribute '__dict__'
The problem is I have a complex type like so:
<complexType name="ConnectionDescription">
<sequence>
<element name = "id" type = "string"/>
<element name = "name" type = "string"/>
<element name = "description" type = "string"/>
<element name = "url" type = "string"/>
</sequence>
</complexType>
<complexType name="ConnectionList">
<sequence>
<element name="Connection" minOccurs="0" maxOccurs="unbounded"
type="agtk:ConnectionDescription"/>
</sequence>
</complexType>
<complexType name="VenueDescriptionType">
<sequence>
<element name="Id" type="string"/>
<element name="Name" type="string"/>
<element name="Description" type="string"/>
<element name="EncryptMedia" type="integer"/>
<element name="EncryptionKey" type="string"/>
<element name="ConnectionList" type="agtk:ConnectionList"/>
</sequence>
</complexType>
And in python I've got this:
avr = AddVenueRequest()
avr._Id = ""
avr._Name = "Test Request"
avr._Description = ""
avr._EncryptMedia = 0
avr._EncryptionKey = ""
avr._ConnectionList = list()
msg = port.AddVenue(avr)
But it doesn't like that _ConnectionList when it serializes.
Ideas?
--Ivan
More information about the ag-dev
mailing list