2 Replies Latest reply on Feb 19, 2010 11:57 AM by olegkon

    AIR and remote connection

    olegkon Level 1



      I am developing an AIR application which can create/read/update Excel 2007 files (XLSX format).

      Since AS3XLS lib doesn't support Excel 2007OpenXML, I had to use Java POI framework,

      so wrote a bunch of Java methods, wrapped them up as a Web Service (and deployed on JBoss 5.1 as WAR file).


      If I install & run that AIR app on my local PC (and have JBoss with that WAR file locally),

      it works just fine (creates/reads/writes/updates XLSX files on my hard disk).


      However, if I deploy that WS WAR on remote JBoss (on Linux),

      and install & run that AIR app on my local PC,

      it does not return XML to me, I am getting:


      <?xml version="1.0" encoding="UTF-8"?>

      <root>  ....nothing here, supposed to be XMLListCollection to populate a DataGrid....




      Does it mean that I have to have a crossdomain file or some configuration setting in that WS WAR

      or inside AIR file ?


      Please help !





        • 1. Re: AIR and remote connection
          olegkon Level 1

          No, that is not a remote access security limitation, AIR should not have it.


          It is a Java FileNotFoundException - Java server code (on JBoss on Linux) has no knowledge

          how to open Excel 2007 file on the client (my PC), like:   C:\temp\somefile.xlsx

          Or update or save file.


          Any idea how to fix that ?



          At the moment AS3XLS lib doesn't support Office 2007, but Java POI 3.5 does.





          • 2. Re: AIR and remote connection
            olegkon Level 1

            It looks like Flex doesn't support SOAP with Attachment : https://bugs.adobe.com/jira/browse/SDK-13381

            so it might be impossible to pass XLSX binary file via Web Service (i.e. zipped archive with 12 XML files and subdirs)


            So that lives me with one of 2 choices:

            - always install web server on local PC, maybe using embedded in AIR2 Tomcat (haven't tried that):



            - maybe scrap Web Service and use Flash Remoting to connect to Java POI side.

            I am not sure is it easy to upload (XLSX) file to the server for reading

            and later download it back to the client PC for saving (as XLSX).

            Can anyone suggest how to do that ?    FileReference ?  FileStream ?


            Any other ideas ?