03-04-2010 10:06 AM
Here is my problem:
I'm trying to receive image files from a .NET WebService in my BlackBerry application. The approach I've taken is sending the images to the BlackBerry as a Base64Encoded String. This works successfully in some cases. However, any large image (on our web server we have some images over 1.5mb in size), does not get received correctly.
What happens on the simulator when attempting to receive one of the very large images is the simulator just immediately returns a string that contains "AA==". A four character String is obviously not a valid Base64Encoded String that can be converted into an image, so anytime there is a problem with casting the String from byte to image I just display an "Image Not Available" image to the end user. It was my hope this would serve as a temporary fix and allow us to ship the application. A longer term fix is we plan to do things a bit differently on the WebService end so that we do not even try to send such long images but instead thumbnail them down. However at present that is not an option.
This solution works perfectly well on the simulator. The problem is on the actual handheld, when trying to receive these large image files it brings the application to almost inhumanly slow levels. Sometimes taking the user's input and returning their images takes 5+ minutes, and sometimes the whole application crashes. (Unfortunately I cannot truly debug on the live device, I can attach the live device to the JDE or to Eclipse, but unfortunately breakpoints don't seem to work when I do this so I can't get a good idea on the error--but I'm almost certain it has to do with receiving the large images.)
The setup I am using:
-BlackBerry Tour 9630 (Sprint) v.18.104.22.168
I use both JDE 22.214.171.124 and the JDE Plug-In for Eclipse.
For actually making my WebService calls I took the approach of auto-generating stubs using the Sun Java Wireless Toolkit 2.5.2_01 and pointing it at my WebService's WSDL.
I'd appreciate any advice anyone has on this issue.
Solved! Go to Solution.
03-04-2010 10:25 AM
probably you did not get the answer at all. please check:
03-04-2010 12:38 PM
Using the information provided above we've decided to shift our development priorities a bit to creating a utility application on the .NET end to create thumb nail images for all of our image files so that we don't run into this problem.
Thanks for your assistance, without ever being able to capture an error code I was never able to find the right search terms on the KB to get the article you linked.