httpconnection

Measure Java's HttpConnection steps (header & body) for metric analysis?

Scenario I'm doing analytics of a data connection being made via Java's HttpConnection. Specifically, I want to measure: Time it took to receive the response header (not the full response) Time it took to download the data (not the full request, the response) To me, it seems as if the HttpConnection class is not sophisticated enough ...

j2me post data limit

is there any limit to send data from j2me device to server. I coded a application to send big data to server from j2me client. it works fine in wtk and sonyericsson emulator. but when i tried same code in real device, I can send only 6K data. then, app throws IOException. every 2K, I run flush function of outputstream to seperate data to...

Is HTTP PUT supported in J2ME?

I just noticed a strange thing in MIDP 2.0 API: The HttpConnection class apidocs make explicit references to methods GET, POST and HEAD, but no other methods. Does this mean that they are not supported? http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/io/HttpConnection.html I also tried checking the MIDP 2.0 spec, bu...

CoverageInfo.getCoverageStatus() vs CoverageInfo.isCoverageSufficient(), are they the same?

In trying to determing a if a specific connection is supported, I'm cofused about the difference between CoverageInfo.getCoverageStatus() and CoverageInfo.isCoverageSufficient(). For example: // check mds with getCoverageStatus() and bitwise check boolean hasMdsCoverage1 = (CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) =...

Blackberry - Is this a guaranteed approach for detecting a valid connection type?

I've created following two methods for reliably building a connection for making a data connection. So far I haven't had any issues testing this approach with users. I'd love to get some community feedback about this approach and letting me know if anything seems in buildConnectionString(). Please see code below: private static String ...

LinkedIn integration - Establish a requestToken

Hi. I'm developing (trying for now) portlet that will be integrated with LinkedIn. Following the documentation about it: http://developer.linkedin.com/docs/DOC-1008 --> The first step to authorizing a LinkedIn member is requesting a requestToken. This request is done with an HTTP POST. For the requestToken step, the following componen...

Looking for proven libraries for Blackberry or J2ME (HttpConnection)

I have an application that makes many subsequent calls to a REST service for batching data to a database on the BlackBerry devices. I have tried several methods of using HttpConnection with various streams to see which might perform the best. So far to the same service other Platforms like Windows Mobile and iPhone can handle the downloa...

Why am i getting a 404 using an HttpConnection object?

2 times out of 10, i will get a 404 response code when i run the code below. can someone please give me some hint why i even get a 404? if i'm missing a command that could prevent a 404 from happening, please point that out. the end goal is to get an image from a remote server and place it in a Bitmap object. nothing complicated. also, i...

Blackberry HTTPConnection best practices.

I am developing a project for BB. The application works with the network and sends / receives data via HTTP. Now I use the queue and queue manager. Manager starts with a background thread and works in while (true) loop, checking the queue for new transactions to the server. If the queue is not empty, then the transaction is executed, oth...

Handling Connection Timeouts in Nokia S60 devices?

I have a thread which handles all the HTTP Connections to the server and there is another thread which updates the UI etc. I have a timeout logic implemented in the UI Thread which looks for some response and times it out (closes the connection and displays a notification to the user) It works perfectly fine on Nokia Series 40 Devices, ...

HTTPConnection for blackberries experiencing intermittent connection.

I'm connecting to an ASP.NET webservice using the HTTPConnection class in Blackberry, but when the blackberry is experiencing low signal strength, the connection just keeps waiting for a response from the server. I've tried timeouts, but with intermittent connections, they're not really helping. Has anyone experienced a similar problem ...

How do you save images to a Blackberry device via HttpConnection?

My script fetches xml via httpConnection and saves to persistent store. No problems there. Then I loop through the saved data to compose a list of image url's to fetch via queue. Each of these requests calls the httpConnection thread as so ... public synchronized void run() { HttpConnection connection = (HttpConnection)Conn...

Blackberry app stuck trying to access a server.

Hi, I've built a ASP.NET webservice and I'm trying to access it from a Blackberry. I've been testing it out with multiple devices and the simulator and it works fine, but there's just the one Blackberry 9000 (It's not the model, I've tried it out with another Blackberry 9000), and it's stuck waiting for a response from the server. Relev...

Blackberry application works in simulator but not device

I read some of the similar posts on this site that deal with what seems to be the same issue and the responses didn't really seem to clarify things for me. My application works fine in the simulator. I believe I'm on Bold 9000 with OS 4.6. The app is signed. My app makes an HTTP call via 3G to fetch an XML result. type is application/x...

python httplib: getting the outgoing request headers

I do: con = HTTPConnection(SERVER_NAME) con.request('GET', PATH, HEADERS) resp = con.getresponse() For debugging reasons, I want to see the request I used (it's fields, path, method,..). I would expect there to be some sort of con.getRequest() or something of the sort but didn't find anything. Ideas? ...

JBlendia JVM and coonectivity problems

Maybe somebody have work experience with HTTPConnection on JVM JBLendia ? ...

Multiple Requests with httpClient (appcelerator)

With appcelerator, I am attempting to send a picture with the twitpic demo, I have created 2 text fields and when they are filled in I want to upload the image and those fields to twitpic. The problem with the app, is after I do it successfully the first time, (without closing the app) the second time doesn't send. I need to somehow r...

Sending by HttpConnection file more than 1kb from J2ME app

When I send a file of size 624 B aprox. it is sent ok by HttpConnection. But when I send bigger file like > 624 B on the call target (PHP script) I don't get any POST parameters at all. I use class HttpMultipartRequest: http://wiki.forum.nokia.com/index.php/HTTP_Post_multipart_file_upload_in_Java_ME like this: Hashtable params = new H...

How to set a timeout on a soap call using ksoap2-android?

Hey hey I'm using ksoap2 for my android project and it works great. I've succeeded in connecting to distant server but I currently have a problem when I want to set a timeout to my androidhttptransport. Is there a clean way (maybe an attribute to set?) to deal with it? I've found this same question there but it's not very detailed. Do...

Find a blackberries user agent on 4.5

I'm trying to find the user agent of a blackberry so I can set it when I make a http connection. On blackberries that are version 4.7+ I call System.getProperty("browser.useragent") and I get the correct value. On earlier versions this returns null. Is there another way to get the user agent? ...