Data Model Flex


    initialize="service.send()">
    
        
            import mx.controls.Alert;
            import mx.rpc.http.HTTPService;
            import mx.rpc.events.ResultEvent;
            import mx.rpc.events.FaultEvent;
            
            private namespace atom = "http://www.w3.org/2005/Atom";
            use namespace atom;
            
            private function resultHandler(event:ResultEvent):void{ 
                var feeds:XML = event.result as XML;
                service.removeEventListener(ResultEvent.RESULT, resultHandler);                                  
                trace(feeds.entry[0].title);
            }
            private function faultHandler(event:FaultEvent):void{ 
                service.removeEventListener(FaultEvent.FAULT, faultHandler);
                Alert.show("Error connecting");
            }       
      
    

                        url="http://server.com/feeds"
                    resultFormat="e4x"
                    result="resultHandler(event);"
                    fault="faultHandler(event);">
            
               Flex