PartSource partSource = new ByteArrayPartSource(fileName, fileContents.getBytes());
System.out.println("Executing POST request to " +FORM_ACTION);
PostMethod post = new PostMethod(FORM_ACTION);
post.addRequestHeader("accept", "text/plain");
try {
Part[] parts = new Part[] {
new StringPart("username", username),
new StringPart("password", password),
new StringPart("ontologyUri", ontologyUri),