3 Replies Latest reply on Jul 26, 2010 3:06 PM by saisri2k2

    ByteStream unrecognized, JSP to FLEX

    ImaginaryCoder

      I'm working on a project that requires me to extract images and sounds stored in database and serve to browser.
      The images and sounds are stored in the BLOB format and i'm able to retrieve the byte arrays respectively.
      I'm trying to send these byte arrays to flex(3) through an HTTP service. However i'm not able to recieve the byte arrays and frankly not sure if this is the right way to do this.

       

      Here are more application specific information
      xyz.jsp file has a tag that calls a function from a java class that reads the database
      i.e <data><%=abc.getData()%></data>
      abc.getData() returns a string(generated of the byte[] of the BLOB data items) and in the flex mxml file i use http request as follows

       

      <mx:HTTPService id="req" url="xyz.jsp" method="POST" resultFormat="e4x" result="rec()"></mx:HTTPService>

       

      and the rec() function has the command to read info like

       

      var str:String = req.lastRequest.data

       

      Everything as far as the syntax is concerned is fine, i say this because if i read some other data form the <data> tag i get the output. I'm thinking there is some issue with sending raw binary information like this.

       

      Any kinda help to solve the problem is appreciated

       

      Thanks and warm regards