If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
BGustafson
Posts: 5
Registered: ‎01-26-2010
My Device: Tour 9630
My Carrier: Sprint
Accepted Solution

Problem receiving very long strings from .NET WebService

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.4.7.1.57

 

I use both JDE 4.7.0.41 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.

Please use plain text.
Developer
dpreussler
Posts: 212
Registered: ‎07-18-2008
My Device: Storm 9550

Re: Problem receiving very long strings from .NET WebService

probably you did not get the answer at all. please check:

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

 

If your problem was solved, please mark answer as "Accepted solution"
If your want to thank, click the "kudo" symbol
___________
visit me: http://mobilejavadevelopment.blogspot.com/
visit the Berlin BlackBerry Developer Group: http://berlinblackberrydevelopers.blogspot.com/
Please use plain text.
New Contributor
BGustafson
Posts: 5
Registered: ‎01-26-2010
My Device: Tour 9630
My Carrier: Sprint

Re: Problem receiving very long strings from .NET WebService

Thanks for the response, I'll be looking into this information to see if it is perhaps the source of my troubles.

Please use plain text.
New Contributor
BGustafson
Posts: 5
Registered: ‎01-26-2010
My Device: Tour 9630
My Carrier: Sprint

Re: Problem receiving very long strings from .NET WebService

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. 

Please use plain text.