|
|
@@ -72,7 +72,6 @@ public class JuheServiceUtil {
|
|
|
String response = EMPTY;
|
|
|
PostMethod postMethod = null;
|
|
|
try {
|
|
|
- System.err.println("test1");
|
|
|
postMethod = new PostMethod(JuHeURl);
|
|
|
// 将表单的值放入postMethod中
|
|
|
postMethod.addParameter("idcard",idCard);
|
|
|
@@ -81,15 +80,13 @@ public class JuheServiceUtil {
|
|
|
postMethod.addParameter("key",KEY_CODE);
|
|
|
postMethod.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, UTF8);
|
|
|
// 执行postMethod
|
|
|
- System.err.println("test2");
|
|
|
int statusCode = client.executeMethod(postMethod);
|
|
|
- System.err.println("statusCode"+statusCode);
|
|
|
if (statusCode == HttpStatus.SC_OK) {
|
|
|
response = postMethod.getResponseBodyAsString();
|
|
|
JSONObject jsonObj = JSON.parseObject(response);
|
|
|
//设置结果 可能成功也可能失败
|
|
|
String reason = jsonObj.getString("reason");
|
|
|
- JSONObject result = jsonObj.getJSONObject("result");
|
|
|
+ JSONObject result = jsonObj.getJSONObject("result");;
|
|
|
if (! "成功".equals(reason)){
|
|
|
log.info("错误信息"+result.getString("message"));
|
|
|
thirdPartyInterfaceEntity.setMessage("人脸比对次数不足");
|