0 Replies Latest reply on Aug 24, 2011 5:06 PM by nunnap2011

    Flash Builder 4.5 SOAP call for images using Base64 Encoding


      I am trying to load some image meta data in a flash builder mobile application by making a SOAP call to .Net service. I am able to test the web service successfully using a .Net console application. However when I make the call from flash builder mobile client I get a null result. What am I doing wrong? I am using SOAP 1.1 ByteArray didn't work for Flash builder. So converted the ByteArray to Base64 format and tried to obtain result that way. Both ways worked from a .Net Client but not working from Flash mobile.



      Here is the code


                  import mx.graphics.ImageSnapshot;
                  import mx.graphics.codec.JPEGEncoder;
                  import mx.graphics.codec.PNGEncoder;
                  import mx.rpc.AsyncToken;
                  import mx.utils.Base64Encoder;         
                  import services.exifimagemetadata1.ExifImageMetaData1;         
                  import spark.components.Image;     

                  public var metaData:ExifImageMetaData1 = new ExifImageMetaData1();         
                  public var imageBytes:ByteArray = new ByteArray();
                  public var gpsData:String;
          private function getBase64EncodedImage():String
                      var myEncoder:Base64Encoder = new Base64Encoder();
                      var image64BitText:String = myEncoder.toString();                          
                      return image64BitText;
          public function GetMetaDataFromExif():void{

                      var imageToken:AsyncToken = metaData.GetExifBase64Data(getBase64EncodedImage());               
                      gpsData = imageToken.result.toString();
                      metaResult.text = gpsData;

          protected function GetImageMetaDataFromExif(event:MouseEvent):void

      <s:Image id="test" width="130" height="140" source="@Embed(source='assets/p1000106.jpg')"/>
      <s:Label width="100" height="140" backgroundColor="Blue" click="GetImageMetaDataFromExif(event)">
      <s:Label id="metaResult" width="200" height="140" backgroundColor="yellow"/>