flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject AW: .jpg images via SOAP webservice using SQL Server as DB
Date Wed, 17 Aug 2016 07:07:11 GMT
Hi,


I am sending image data as byte-array from BlazeDS to my Flex application without any problems.
But I just checked the beginning of this thread ... as you are using SOAP I guess you will
have to Base64 encode the data as the raw byte data could contain any XML character to mess
up things.


Chris

________________________________
Von: Alex Harui <aharui@adobe.com>
Gesendet: Mittwoch, 17. August 2016 02:13:03
An: users@flex.apache.org
Betreff: Re: .jpg images via SOAP webservice using SQL Server as DB



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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message