Inconsistent typing with HTTP Data Service and <mx:HTTPService>
i using http data service, types data returned xml youtube api. have httpservice object <httpservice>. each entry in raw xml data retrieve contains several namespaces, this:
<entry>
<gd:comments>
<gd:feedlink counthint="573986"/>
</gd:comments>
<media:group>
<media:category label="comedy" scheme="http://gdata.youtube.com/schemas/2007/categories.cat">comedy</media:category>
<media:player url="http://www.youtube.com/watch/>
<media:thumbnail height="360" time="00:03:00"/>
<media:title type="plain">title</media:title>
<yt:duration seconds="360"/>
</media:group>
<gd:rating average="4.6989236" max="5" min="1" numraters="940187" rel="http://schemas.google.com/g/2005#overall"/>
<yt:statistics favoritecount="959236" viewcount="199961940"/>
</entry>
the data service uses xmlserializationfilter, converts namespaces colons become underscores. flash builder's data/service wizard created data type each entry , nodes. resulting data object looks this:
data.gd_feedlink.counthit
data.media_group.media_thumbnail.url
data.media_group.media_category.label
data.yt_statistics.favoritecount
the httpservice removes namespaces same data looks this:
data.feedlink.counthit
data.group.thumbnail.url
data.group.category.label
data.statistics.favoritecount
if set httpservice serializationfilter property xmlserializationfilter prefixes data namespaces data service, entries of objectproxy type, when resultelementtype property set entry type. extensive reading , experimenting have failed solve this.
is there way change either data service or httpservice results use same type , same naming scheme? preferably typed data service's use of entry type.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment