[AG-DEV] SendEvent of SharedAppClient doesn't work

Christoph Willing c.willing at uq.edu.au
Fri Jul 4 01:58:56 CDT 2008


On 04/07/2008, at 10:45 AM, Florian Birnthaler wrote:

> Hello,
>
> I have a strange problem with the SendEvent-method of the
> SharedAppClient.
> If I send a string or a number it works without a problem. The
> number/string is perfectly received by the method that I registered as
> the event handler.
> But if I send a tuple or a list I receive a dictionary with the keys
> being some weird strings and their values being the elements of the
> tuple/list.


Florian,


I'm pretty sure that ZSI can only deal with simple types so (for now  
at least) you'll have to break your dictionary (whatever) into simple  
types something like this (from __EnterVenue() in  
AccessGrid.VenueClient.py, which immediately follows a comment about  
this "feature" of zsi):
    self.venueState = VenueState(uniqueId=state.uniqueId,  
name=state.name, description=state.description, uri
=state.uri, connections=state.connections, clients=state.clients,  
data=state.data, eventLocation=evtLocation, tex
tLocation=state.textLocation, dataLocation = state.dataLocation,  
applications=state.applications, services=state.
services)


chris


> Here is an example of some debug messages:
>
> DEBUG: sending SetView event: ('testString1', 'testString2')
> DEBUG: SetView event received: {'Eoa8a390': u'testString1',  
> 'Eoa8a3b8':
> u'testString2'}
>
> I don't chance the events in any way, after I send them. There  
> seems to
> be something wrong with the serialized data that is sent over to the
> event channel. I used the Python debugger to get deeper into the
> SendEvent-call and found out that this SOAP envelope was created:
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP- 
> ENV:Header><
> /SOAP-ENV:Header><SOAP-ENV:Body><Eo33f9a80
> xmlns:ns1="http://www.accessgrid.org/v3.0"
> xsi:type="ns1:EventDescription"><ns1:channelId
> xsi:type="xsd:string">82664eb22bc448ef7711328383d23793</ 
> ns1:channelId><n
> s1:senderId
> xsi:type="xsd:string">82664eb22bc44a6852b8726be95ce316</ 
> ns1:senderId><ns
> 1:data><Eoaa7f98 xsi:type="xsd:string">testString1</Eoaa7f98><Eoaa7fc0
> xsi:type="xsd:string">testString2</Eoaa7fc0></ns1:data><ns1:eventType
> xsi:type="xsd:string">SetView</ns1:eventType></Eo33f9a80></SOAP- 
> ENV:Body
>> </SOAP-ENV:Envelope>
>
> Here you can already see those strange numbers. But I don't know what
> they mean or how to get rid of them. Because in my event handler  
> method
> T just want to receive the original tuple or list. I searched for a
> solution in the web, but unfortunately I didn't find anything.
> Does someone have an idea how to fix this?
>
> Cheers,
> Florian
>

Christoph Willing                        +617 3365 8350
QCIF Access Grid Manager
University of Queensland







More information about the ag-dev mailing list