Index: ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/VerificationCodeDaoImpl.java =================================================================== diff -u -r40931 -r40934 --- ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/VerificationCodeDaoImpl.java (.../VerificationCodeDaoImpl.java) (revision 40931) +++ ssts-datasync-default-impl/src/main/java/com/forgon/disinfectsystem/datasynchronization/dao/zsyy/VerificationCodeDaoImpl.java (.../VerificationCodeDaoImpl.java) (revision 40934) @@ -79,24 +79,26 @@ //params.put("f", "1"); String responce = CssdUtils.postRequest(URL, params, "UTF-8"); //String responce = ""; + //String responce = "result=0&description=发送短信成功&taskid="; logger.debug(String.format("完成发送短信,接收短信的手机号码为【%s】,短信内容为【%s】,短信发送接口返回的信息为【%s】", smsMumber, messageContent, responce)); if(StringUtils.isBlank(responce)){ throw new RuntimeException("短信发送接口返回的消息为空!"); } + String resultStr = null; try { Document document = DocumentHelper.parseText(responce); String dataXpath = "/data"; - responce = processDataByXpath(document, dataXpath); + resultStr = processDataByXpath(document, dataXpath); } catch (Exception e) { e.printStackTrace(); - throw new RuntimeException(String.format("短信发送失败:返回参数解析失败,%s", e.getMessage())); + logger.debug("/data解析失败:" + e.getMessage()); } - if(StringUtils.isBlank(responce)){ - throw new RuntimeException("短信发送接口返回的消息为空!"); + if(StringUtils.isBlank(resultStr)){ + resultStr = responce; } String result = ""; String description = ""; - String[] responceParams = responce.split("&"); + String[] responceParams = resultStr.split("&"); for (String keyValue : responceParams) { String[] keyValueArray = keyValue.split("="); if(StringUtils.equals("result", keyValueArray[0])){