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
Visitor
Posts: 1
Registered: ‎12-11-2009
My Device: Not Specified

Large Data send to server (1 mb)

[ Edited ]

 

HI All,

 

i am developing blackberry application. this application will send 1 mb of data to our server.

but whenever i am sending more than 300 kb it taken more time apporx 10-15 minute and some time i got timeout exception .

 

i am sending data vis MDS or TCP/IP 

Chunk size 100 kb

http header:

 

lHttpConnection.setRequestProperty("HTTP-Version", "HTTP/1.1");

lHttpConnection.setRequestMethod(HttpConnection.POST);

lHttpConnection.setRequestProperty("Accept", "*/*");    

lHttpConnection.setRequestProperty("User-Agent", "BlackBerry");

lHttpConnection.setRequestProperty("MIME-Type", "PGP/MIME");

lHttpConnection.setRequestProperty("x-rim-authentication-passthrough", "false");      
lHttpConnection.setRequestProperty("cache-control", "max-age=259200");

lHttpConnection.setRequestProperty("Connection", "keep-alive")

;lHttpConnection.setRequestProperty("Content-Type","application/octet-stream");

lHttpConnection.setRequestProperty("Content-Encoding", "gzip");

lHttpConnection.setRequestProperty("Content-Length",Integer.toString(iRequestData.length));

 

please help me out. i am strugling with issue since last 1 month.

 

 

please help me.

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Large Data send to server (1 mb)

[ Edited ]

Welcome to the forums.

 

I would personally caution against sending large chunks of data to the Server.  Send small chunks and make the process restartable at the failed chunk.  If you are sending large amounts of data in one chunk and the transmission fails, as is quite possible on a mobile device, then you will have to restart from the beginning, which could compound the problem. 

 

That said, could we see how you are sending the bytes - here we only see the header fields being set. 

 

I am particular interested in the fact that you set GZIP encoding and the MIME to PGP.  Are you actually sending gzipped data that has been encrypted using PGP code?

 

One other thing, is this processing working for smaller requests?