Dear members, due to maintenance work, the RWS Community might be down tomorrow, Wednesday, 06.07.2022, from 05:30 AM CET to 06:30 AM CET. We thank you for your time and understanding throughout the process.

Translate File SDL Language Cloud REST API


I'm unable to use API in a Java environment.

This is my source:

HttpEntity entity = MultipartEntityBuilder
.addTextBody("from", "ita")
.addTextBody("to", "eng")
.addBinaryBody("file", file, ContentType.create("application/octet-stream"), filename)

HttpPost httpPost = new HttpPost(urlStr);

httpPost.addHeader("content-type", "multipart/form-data");
httpPost.addHeader("authorization", "LC apiKey=myKey");
httpPost.addHeader("termbaseIds", "[myTermbase]");

HttpClient httpClient = HttpClientBuilder.create().build();
HttpResponse response = null;

try {
response = httpClient.execute(httpPost);
} catch (IOException e) {
if (response != null){
return EntityUtils.toString(response.getEntity());
return null;


When run the code, server reply:

{"message":"An error occured while processing your request!","errorCode":"GENERIC_APPLICATION_EXCEPTION","details":[]}

Wrong something?


UPDATE 18-6-17:

The getStatusLine() method return 500 Internal Server Error.


Thanks for the reply!


Parents Reply Children
No Data