0 Replies Latest reply on Nov 4, 2010 9:59 AM by frenmanoj

    How to convert double array data from ActionScript to Java ?


      I need  to send a double array data from flex to java server via remote  object. There is no problem with sending the data to server. But, the  problem is how to retrieve the double array data in server. Based on  various articles, and resources from internet, it has been confirmed  that Arrays in actionscript are converted to java.util.List. But, i  actually didn't get the idea on how to get my original data back. 

      For instance, i have inserted my flex code as below. There, i need a code for java server to retrieve the data (named "myData").


      <?xml version="1.0" encoding="utf-8"?> 
      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"  
              <mx:RemoteObject id="remoteObject" 
                  <mx:method name="functionName"  
                             fault="faultHandler(event)" /> 
                  import mx.rpc.events.FaultEvent; 
                  import mx.rpc.events.ResultEvent; 
                  protected function button_clickHandler(event:MouseEvent):void 
                      var myData:Array = new Array(6); 
                      myData[0] = new Array(1,2,3); 
                      myData[1] = new Array(4,5,6); 
                      myData[2] = new Array(7,8,9); 
                      myData[3] = new Array(10,11,12); 
                      myData[4] = new Array(13,14,15); 
                      myData[5] = new Array(16,17,18); 
                  private function resultHandler(event:ResultEvent):void  
                      // some result handling codes (if any) 
                  private function faultHandler(event:FaultEvent):void  
                      // some fault handling codes (if any) 
          <s:Button  label="Send data" 
                         click="button_clickHandler(event)"  /> 

      Your suggestions are generously appreciated.