In the end I found a solution thanks to the google groups of the api. After I was able to get the content of my http request with this code:
// HTTP request
HttpRequest request = requestFactory.buildPostRequest(new GoogleUrl(url), atomContent);
File f = new File(Main.BASE_FOLDER_PATH + "ciao.xml");
FileOutputStream out = new FileOutputStream(f);
request.getContent().writeTo(out);
out.close();
HttpResponse re = null;
re = request.execute();
I used the content api demo tool to send my insert request by copy-pasting my raw xml. From the tool I was able to get the errors in the response, however I noticed that the response I get by using the java api is different, because the HttpClient class trows an exception if it can't parse a Product.