0 Replies Latest reply on Jan 10, 2007 6:35 PM by kicker79

    Using CF to retrieve XML to feed Flex App

      I am trying to get a flex app to send a selection to a cfc which in turn retrieves a RSS feed from a location and parses it then returns it back to the flex app to be displayed in a grid. My problem lies with how to place the XML feed that is returned into the data grid for display. I have everything else working and the RSS feed follows the standard format yet I get nothing. Here is my flex code for my grid:

      <mx:DataGrid x="197" y="10" width="644" height="162" id="myRssdg" dataProvider="{wsRSSAggr.getRssFeeds.lastResult.rss.channel.item}" >
      <mx:DataGridColumn headerText="Post Title" dataField="title"/>

      <mx:DataGridColumn headerText="Date Of Post" dataField="pubDate"/>

      This should work....at least with my limited understanding. I do get results back, I checked by dumping the results back into a textarea field. Here is my cfc code just incase the error is there:

      <cffunction name="getRssFeeds" access="remote" returntype="any">
      <cfargument name="feedType" required="yes" type="string">
      switch (#arguments.feedType#) {
      case "Easycfm":
      URLToGet = " http://www.easycfm.com/syndication/mostviewed.cfm";
      case "YahooNews":
      URLToGet = " http://rss.news.yahoo.com/rss/topstories";
      <cfhttp url="#URLToGet#" method="GET" timeout="15"></cfhttp>
      RssContent = trim(cfhttp.filecontent);
      RssContent = XMLParse(RssContent);
      <cfreturn RssContent>

      Any help would be appreciated. Thanks.