new StringPart("token", params[1]),
new StringPart("description", attachment.getDescription()),
new StringPart("contenttypemethod", "manual"),
new StringPart("contenttypeentry", attachment.getType()),
new StringPart("comment", additionalComment),
new FilePart("data", new ByteArrayPartSource(fileName, attachment.getData()))
};
PostMethod method = new PostMethod(POST_ATTACHMENT);
method.setRequestEntity(new MultipartRequestEntity(parts, method.getParams()));
try {
client.executeMethod(method);