File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Malformed or illegal request in HttpConnection !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Malformed or illegal request in HttpConnection !!" Watch "Malformed or illegal request in HttpConnection !!" New topic

Malformed or illegal request in HttpConnection !!

Van Vu

Joined: Oct 13, 2006
Posts: 15
Hello everybody,

I am writing a midlet that connect to IP camera and displaying live images from it. The midlet work fine in emulator, when I connect to my local ip cam with local ip. But when I put my midlet to Sony Erisson mobile, midlet connected to ip cam, the status is 200, but the ip cam response: error page! internal error in API.

Then, I tried in emulator to connect to some ip camera with global ip, however, the emultor always said: status 400(meant malformed or illegal request). Although I can use my web browser to open that global IP. The address I tried to connect to is:

Does anyone have some idea about this problem, please help me.

Thank you very much
Van Vu

Joined: Oct 13, 2006
Posts: 15
And I want to make it a bit clearer:
1. With emulator, the IP camera responses: 400 -->malformed or illegal request although I can open the URL in web browser.
2. With real device: the IP camera responses: 200, but the response come after is: error page, internal erro in API.

The URL I tried to access is something like this: This is valid URL, why it does not work ??? (
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
It can be a matter of port number restrictions on the API side.
Have you tried more "standard" ports in place of 90, eg 8080, 80?

Eduardo Marques
Get ready for your SCMAD certification at - See what all the buzz is about ...
It is sorta covered in the JavaRanch Style Guide.
subject: Malformed or illegal request in HttpConnection !!
Similar Threads
Sun emulator can't OTA my app from a remote web server
How to turn off confirm messages in emulator??
WTK Emulator can't OTA from remote web server
jpeg problem on some phones !!!
How to foce Nokia 7210 SDK to use HTTP rather than WAP?