Okay, I found the answer. The problem was, when you create a new MultipartEntity it generates a random boundary, but my server was waiting for my own boundary. So I just had to change the MultipartEntity constructor to this:
String boundary = "---------------------------Yout own boundary";
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE, boundary, null);