character limitation of the api call.
character limitation of the api call.
Posted on: Wed, 09/07/2011 - 06:39
The OC api returns a 414 error server (request too long) when the size of the call exceeds 6000 char.
Is it a way to avoid this limitation?
Trackback URL for this post:
http://www.opencalais.com/trackback/112286

Hi Denis,
Hmmm. The limitation per submission is, indeed, 100,000 characters.
I suggest you resubmit the offending document and see if it processes appropriately (you've probably already done that). If the error continues, please let us know here in the Forum, posting the problem document.
I've communicated the problem to our technical folks, who will respond here.
Regards,
Hi Dennis,
Can you give us an example?
Hi FranSan,
the limitation didn't come from your api but from the method i was using to call the API. i changed it and it works.
Denis,
Thanks for letting us know - I love it when users post questions and even more when they figure out the solutions and share findings here in the forums. It helps everyone.
Cheers,
hi,
sorry i didn't give more explanation, but i didn't really understand the difference between the two methods. if someone can figure it out..
in the first one:
URL url = new URL(appendedurl);
Connection connection= url.openConnection();
...
connection.connect();
InputStreamReader ipsr = new InputStreamReader(connection.getInpustream());
BufferedReader buf = new BufferedReader(ipsr);
StringBuilder build = new StringBuilder();
while (buf.ready()) {
build.append(buf.readLine());
}
it returns me an error from the server if the length of the url is > 6000 chars
and gives me sometimes unparsable json ( 2 right brackets missing)
the second one :
URL url = new URL(appendedurl);
Connection connection= url.openConnection();
...
InputStreamReader ipsr = new InputStreamReader(connection.getInpustream());
BufferedReader buf = new BufferedReader(ipsr);
StringBuffer buffer = new StringBuffer();
while (buf.ready()) {
buffer.append(buf.readLine());
}
this one works well allowing me to send huge texts
and return parsable json.