flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: .jpg images via SOAP webservice using SQL Server as DB
Date Wed, 17 Aug 2016 00:13:03 GMT


On 8/16/16, 9:36 AM, "CodeGirl" <MichelleNicholes@yahoo.com> wrote:

>Here is a suggested work around.
>
>http://stackoverflow.com/questions/25255030/as3-loading-images-binary-xml-
>to-flash
>
>What is an FLA?

A FLA is the project file for Adobe Flash Professional.

>
>I am guessing the suggestion here is in JPA on my backend, convert my
>varbinary(MAX) to a String.
>
>Let SOAP send it as a String.  Let the Value Object be a String.  Then
>when
>I want to display the image,
>I apply the decoder in the link above to convert the string to a
>ByteArray. 
>Of course I still need to figure out how I send the data from ByteArray
>to a
>BinaryImage.   I am new to using images.  My apps are normally really
>plain.
>

This is not my area of expertise, but AIUI, you might be better off
getting the backend to send the image as base64 as suggested in the
article you linked to, but do it by getting the data type to match one of
the base64 types in this article:

http://help.adobe.com/en_US/Flex/4.0/AccessingData/WS2db454920e96a9e51e63e3
d11c0bf69084-7fdb.html

I think if you can do that, the SOAPDecoder will convert the data to a
ByteArray properly.  I think the way it is set up right now is throwing an
error because the generic decoder can't decode directly to ByteArray.  I
think it needs to know that it is Base64-encoded.

HTH,
-Alex

Mime
View raw message