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
Trusted Contributor
Posts: 105
Registered: ‎02-02-2011
My Device: Bold 9900
My Carrier: Airtel

requested entity too large response when receiveing an xml data

In our application we need to receive an xml data from our server, We using BIS connection, When we receiving the data we got "HTTP error 413 request entity too large" . While seraching we got this is the problem of large size of data, We are using BIS connection, Is there any way to receive the large sized data ?

 

 

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

Re: requested entity too large response when receiveing an xml data

Two immeidate thoughts.

 

a) Use Wifi for this download

 

b) Use this approach, whihc applies to BIS-B as well:

http://supportforums.blackberry.com/t5/Java-Development/Download-large-files-using-the-BlackBerry-Mo...

Trusted Contributor
Posts: 105
Registered: ‎02-02-2011
My Device: Bold 9900
My Carrier: Airtel

Re: requested entity too large response when receiveing an xml data

Thanks for your quick reply.

 

  In our existing application we send the xml data as packets, Now we are trying to improve the performance , for this we need to send the entire data as one packet, so the size of the packet will increase and got the error "HTTP 413 - Request Entity Too Large " . We cannot say all our clients to use WiFi,

 

have you any other thoughts ? 

 

 

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

Re: requested entity too large response when receiving an XML data

I appreciate not everyone has WiFi, but it is worth the effort to detect this and use WiFi for the download since it could be a lot faster. 

 

If you are not using WiFi, I think the chunking will not have that much impact on the overall time, and more importantly, if there is a problem you can recover from just the failed chunk.  I suggest that you test this approach compared with downloading it in one hit. 

 

Another option is to use a different communication method.  As far as I know, neither WAP nor Carrier TCP have these limits on the size, however on some carrier plans these cost - your users may not appreciate  being charged just so that they can download quicker.  But then again, they might not mind and they might not be changed.

 

What size data are we talking here?

Trusted Contributor
Posts: 105
Registered: ‎02-02-2011
My Device: Bold 9900
My Carrier: Airtel

Re: requested entity too large response when receiving an XML data

have you know the maximum size of the record that BB can support in a single hit ?

our failed record size is 219370 bytes, 

 

 

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

Re: requested entity too large response when receiving an XML data

Not sure maximum, but I thought it was higher than you are seeing:

 

http://supportforums.blackberry.com/t5/Java-Development/HTTP-413-Request-Entity-Too-Large/ta-p/44598...

 

Just realized of course that you might not be using BIS-B, so you might be suffering a limit imposed by your carrier.  What connection method are you using - BIS-B, WAP, Carrier TCP?  if you are using WAP or Carrier TCP, then the limit is possibly something you can't do anything about.....

 

 

 

Trusted Contributor
Posts: 105
Registered: ‎02-02-2011
My Device: Bold 9900
My Carrier: Airtel

Re: requested entity too large response when receiving an XML data

[ Edited ]

Now we append the url with ";deviceside=false;ConnectionType=mds-publc"   for BIS

 

Which string we should append for BIS-B  ?

 

 

 

We got the same error "requested entity too large" in the simulator, we using the following code for the simulator 

 

if (DeviceInfo.isSimulator())
{
url = url.concat(";deviceside=false");
}

 

 

 

 

 

 

 

 

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

Re: requested entity too large response when receiving an XML data

You are using BIS-B.  Some people say BIS but that connection is actually ,BIS-B. 

 

Can you confirm the file size again.