Am getting the below message
![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)
, success=1, statusCode=200}
responseString:::
![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)
And my user name is : srini@newgen.co
my http post code:
try {
post = new org.apache.http.client.methods.HttpPost(
eachSpub.get("host") + "?operation=doDOICitUpload?login_id=" + eachSpub.get("username") + "?"
+ "login_passwd=" + eachSpub.get("password"));
post.setHeader("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*");
post.setHeader("Content-Type", "multipart/form-data;boundary=---------------------------7d22911b10028e");
post.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)");
post.setHeader("Accept-Language", "en-us");
post.setHeader("Content-Disposition", "form-data; name=fname" + "; filename=" + metaFileName);
File file = new File(metaFile);
FileEntity entity = new FileEntity(file);
post.setEntity(entity);
CloseableHttpResponse postresponse = client.execute(post);
responseString = org.apache.http.util.EntityUtils.toString(postresponse.getEntity());
responseObj = (HashMap<String, Object>) Utils.stringToMap(responseString);
post.releaseConnection();
responseObj.put("statusCode", postresponse.getStatusLine().getStatusCode());
if (postresponse.getStatusLine().getStatusCode() == 200) {
responseObj.put("response", responseString);
} else {
responseObj.put("response", "400 Bad Request error");
}
responseObj.put("success", 1);
System.out.println("responseObj:::" + responseObj);
System.out.println("responseString:::" + responseString);
client.close();
} catch (Exception e1) {
responseObj.put("response", false);
e1.printStackTrace();
}