MultipartEntityBuilder builder = MultipartEntityBuilder.create();
ContentBody cbFile = new InputStreamBody(is,
ContentType.create("text/plain"), "UploadTestFile.txt");
builder.addPart("fileUpload", cbFile);
builder.addPart("extTID", new StringBody("2", ContentType.DEFAULT_TEXT));
builder.addPart("extAction", new StringBody("fileUploadService",
ContentType.DEFAULT_TEXT));
builder.addPart("extMethod", new StringBody("uploadTest",
ContentType.DEFAULT_TEXT));
builder.addPart("extType", new StringBody("rpc", ContentType.DEFAULT_TEXT));
builder.addPart("extUpload", new StringBody("true", ContentType.DEFAULT_TEXT));