Calling webservice in flex3.0

Can anyone tell me the steps to call the webservice using flex3.0.Webservice is written in java and populate the datagrid of flex.
Who is Participating?
this should help you out...its assuming your webservice is giving back xml.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="" layout="absolute"

                  import mx.collections.ArrayCollection;
                  import mx.collections.XMLListCollection;
                  import mx.controls.Alert;
                  import mx.utils.ObjectUtil;

                  public function grabXML():void{

                  [Bindable] private var dp:XMLListCollection;

                  private function httpService_result(evt:ResultEvent):void {
                        dp=new XMLListCollection( as XMLList);

                        //the fields in my xml being returned are band, album and title


            <mx:HTTPService id="httpService" showBusyCursor="true"
                                    resultFormat="e4x" url="music.xml"
                                    result="httpService_result(event)" />


            <mx:VBox horizontalAlign="center" verticalAlign="top" width="100%" height="100%">

                        <mx:DataGrid id="songList" labelField="title" dataProvider="{dp}"  width="100%" height="100%"  
                                       selectionColor="#AAAAAA" borderStyle="none" borderVisible="false">
                                    <mx:DataGridColumn headerText="Band" dataField="@band"   />
                                    <mx:DataGridColumn headerText="Album" dataField="@album"/>
                                    <mx:DataGridColumn headerText="Song" dataField="@title"/>


This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.