use of com.liumapp.digitalsign.test.ca.tianwei.query.QueryCertResult in project spring-cloud-digital-sign by SpringForAll.
the class RaService method queryCertByCertId.
/**
* 通过CERT_ID查询证书
*
* @Title: queryCertByCertId
* @Description: TODO(通过CERT_ID查询证书 )
* @param certId
* 证书ID
* @return JSONObject 返回结果信息
* @throws JSONException
*/
public JSONObject queryCertByCertId(int certId) throws JSONException {
JSONObject ret = new JSONObject();
String json = "";
if (certId == 0) {
ret.put("code", "10010107");
ret.put("msg", errorCode.getErrorCode().get(10010107));
return ret;
}
try {
if (CERT_ISKMC != null) {
json = "{'certKmcReq2':'" + (CERT_ISKMC.equals("false") ? "" : "kmcClientVersion=20150130") + "','certValidity':'" + CERT_REQ_CHALLENGE + "'}";
}
UserAPIServicePortTypeProxy proxy = axisUtil.getProxyNow();
QueryCertResult result = proxy.queryCertByCertId(certId, ACCOUNT_HASH, json);
ret.put("code", "0");
ret.put("msg", "");
ret.put("result", result);
} catch (Exception e) {
ret.put("code", "20010101");
ret.put("msg", errorCode.getErrorCode().get(20010101) + ":" + e.getMessage());
return ret;
}
return ret;
}
Aggregations