-1

I am developing with lwuit to Nokia and Blackberry.

I am working with server and connections. If I call to server that I am working, all work fine. But, if I try to call to external url that receive jpg, the connection request is stuck and I get responde code 400. The connection is failed in function performOperation() of class ConnectionRequest.

Why its happen?

If I call to my server and get image its work fine but when I call to external jpg it's don't work. Is there any solution to this?

All this happen in simulator.

Kalai Selvan Ravi
  • 2,846
  • 2
  • 16
  • 28
neb
  • 78
  • 8

4 Answers4

0

I don't really understand what you are looking for.

But I think you must check the URL of the image. Also, the class com.sun.lwuit.io.services.ImageDownloadService might be very useful to you.

gimpf
  • 4,503
  • 1
  • 27
  • 40
NaPsTeR
  • 31
  • 4
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/faq#reputation) you will be able to [comment on any post](http://stackoverflow.com/privileges/comment). – gimpf Sep 20 '12 at 13:23
  • At least i'm trying to help him – NaPsTeR Sep 20 '12 at 15:03
  • I appreciate your effort to help. My comment above was written during a review at a time when your answer was still just a single sentence. – gimpf Sep 20 '12 at 17:16
  • What i found that the problem was in urls that use in HttpProtocol. When i run the application on Nokia device, i get the images. I think that maybe the problem is only on blackberry simulators and http protocol or that we have problem at blackberry with http protocol. – neb Sep 23 '12 at 08:00
0

RIM network connections differ from Nokia/standard J2ME due to all sorts of proprietary behaviors added by RIM. Codename One's IO API hides this complexity, if you don't want to migrate I suggest you read up on RIM's networking APN, its a bit complex for a single stack overflow answer.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • I try to load another images. they load fine. only in specific url the problem occurs. maybe its tied to a problematic urls? – neb Oct 11 '12 at 06:34
0

Add ";deviceside=true" at the end of your url... like "http://myHost/images/flux.jpg;deviceside=true", for Blackberry

NaPsTeR
  • 31
  • 4
0

I found the problem. This occurs because i use POST method. I think in case that we dont send parametes but use method POST is occurs to problem with Content-Length in header of http message and this the reason that i recieve error(400 or 411)

neb
  • 78
  • 8