System.out.println("Executing POST request to " +formAction);
PostMethod post = new PostMethod(formAction);
post.addRequestHeader("accept", "text/plain");
try {
Part[] parts = new Part[] {
new StringPart("username", username),
new StringPart("password", password),
new StringPart("ontologyUri", ontologyUri),
new FilePart("ontologyFile", partSource),
new StringPart("graphId", graphId),
};
post.setRequestEntity(new MultipartRequestEntity(parts, post.getParams()));
HttpClient client = new HttpClient();
client.getHttpConnectionManager().getParams().setConnectionTimeout(5000);