From: Trivedi, A. <Apa...@ny...> - 2009-02-09 22:54:34
|
Ok, i have looked into this more. So it seems if I do _attrs on the property_def object, then I get a hash entry with the 'key' attribute as the key and the node value as the value. This will work, but it is not what I expected. Shouldn't "get_attribute_attrName()" work on this? Thanks Par ________________________________ From: Trivedi, Apaar [mailto:Apa...@ny...] Sent: Monday, February 09, 2009 4:20 PM To: pyw...@li... Subject: Re: [Pywebsvcs-talk] attribs not getting loaded? I've updated the example Josh had come up with in the 'circular' thread I started last week. This example shows how ZSI is loading up this response and seems to be dropping the attribute information by storing only a list: You can see the full example of the response in response.xml. The run.py shows that when you access the property nodes stored in the attributes: for r in pyobj._RecordsResult._Records._Record: print r._Attributes._Property then you only get a list, you do not get a property holder object, and it seems that because of this I can no longer access the 'key' attribute that is part of the response. Thanks Par ________________________________ From: Trivedi, Apaar Sent: Monday, February 09, 2009 1:57 PM To: 'pyw...@li...' Subject: attribs not getting loaded? I am looking through the response object that I receive when making a query, and it seems that some attributes are not getting loaded on my holder object. For instance, I get some xml like this back in my soap response: <Record Id="10525"> <Attributes> <Property Key="Creditcards">visa,mastercard</Property> <Property Key="FaxNo">(111) 369-2564</Property> <Property Key="HTMLUrl">SX006.html</Property> </Attributes> </Record> The attributes type holds a Property list. When I get that list, all I get is a list of the values, I do not see a 'property' object, and I cannot access the Key attribute by doing someProp.get_attribute_Key(). When I do response._Records._Record._AttributeList._Property I get a list of only the values, just a basic python list, no holder object. The get_attribute works fine for other types, which do not contain values in the node. I generate my bindings using -b and -l. Any help is appreciated. Thanks! Apaar |