Bonjour
Je suis en train d'apprendre à developper avec Flex et j'essaye d'utiliser les flux rss. Dans l'exemple d'adobe ca marche tres bien (l'adresse du flux est http://weblogs.macromedia.com/mchotin/index.xml) mais quand j'essaye d'utiliser l'adresse de developpez.com (http://developpez.com/rss.php) ca me fait cette erreur lorsque je lance mon application flash:
Voici mon code :[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at ::DirectHTTPMessageResponder/securityErrorHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
A noter que j'ai la même erreur pour tous les autres flux rss que j'ai testé (france2, france3, Le Monde, Figaro, swg-fr, etc...)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="feedRequest.send()" layout="absolute" x="10"> <!-- Recupere le fichier xml --> <mx:HTTPService id ="feedRequest" url ="http://developpez.com/rss.php" useProxy="false" /> <mx:Panel title="{feedRequest.lastResult.rss.channel.title}" width="475" height="400" > <mx:Label text="Premier Tableau" fontWeight="bold" fontSize="24" x="50" /> <mx:DataGrid id="dgPosts" x="20" y="50" width="400" dataProvider="{feedRequest.lastResult.rss.channel.item}"> <mx:columns> <mx:DataGridColumn headerText="Posts" dataField="title"/> <mx:DataGridColumn headerText="Date" dataField="pubDate" width="150" /> </mx:columns> </mx:DataGrid> <mx:TextArea x="20" y ="220" height="100" width="400" htmlText = "{dgPosts.selectedItem.description}" /> <mx:LinkButton x="20" y="380" label="Lire en entier" click="navigateToURL(new URLRequest(dgPosts.selectedItem.link));" /> </mx:Panel> </mx:Application>
Merci
Partager