we use opencmis in our webapplication to interact with alfresco (soap binding). In version 4.1.5 enterprise, connection.getInputStream() is failing to download complete document. content is getting truncated at 11kb.
URL url;
URLConnection conn;
String downloadUrl;
url = new URL(downloadUrl);
String loginPassword = alfrescoUsername + ":" + alfrescoPass;
String encoded = new sun.misc.BASE64Encoder().encode(loginPassword
.getBytes());
conn = url.openConnection();
conn.setRequestProperty("Authorization", "Basic " + encoded);
response.setContentType(mimeType);
response.setHeader("Content-Disposition", "attachment; filename=\""
+ filename + "\"");
response.setHeader("Content-Transfer-Encoding", "binary");
FileCopyUtils.copy(conn.getInputStream(),
response.getOutputStream());
response.flushBuffer();
Same code works fine with alfresco 4.0.1. does any one know if any changes/updates added in 4.1.5 enterprise version.