0 Replies Latest reply on Nov 2, 2010 1:13 PM by crzymnmchl

    Problems serializing and saving out OLAPCube object.

    crzymnmchl Level 1

      The OLAPCube is complex - it contains Dimensions which contain Hierarchies etc. cube.refresh takes a couple of minutes against our SQLServer cube, so I want to save it out and load back in when the app constructs. However although the encoding works, it will not decode back into a cube and I think it might be because of all the private methods etc within this very complex class(?). Is it possible to do this kind of thing with a gnarly object like OLAPCube?


      flash.net.registerClassAlias("components.cube.olap.OLAPCube", OLAPCube);
      var byteArray:ByteArray = new ByteArray();
      byteArray.writeObject( cube );
      var encoder:Base64Encoder = new Base64Encoder();
      var byteString:String = encoder.toString();
      // test uncompress - this will be save to backend and reloaded
      var decoder:Base64Decoder = new Base64Decoder(); decoder.decode(byteString); var ba:ByteArray = decoder.toByteArray(); ba.uncompress(); var testCube:OLAPCube = new OLAPCube; testCube = ba.readObject(); // is not a cube :-(