public static LoginAuthResponse parseAuthResult(String authResult) throws LoginAuthException {
LoginAuthResponse resMsg = new LoginAuthResponse();
String[] responseItems = authResult.split("[/^][$][/^]" );//分割符^&^要撇开Perl正则语法集保留字(可怕的笑脸)
if (responseItems == null || responseItems.length < 2) {//不严格用等于2,以免服务端返回而外的说明信息
throw new LoginAuthException("loginAuth登陆认证响应报文格式错误,报文:"+authResult);
}
resMsg.setRetcode(responseItems[0].toLowerCase());//不区分大小写
resMsg.setRetmsg(responseItems[1]);
for(int i =0;i<responseItems.length;i++) {
resMsg.getAdditionalInfo().put("F"+i, responseItems[i]);
}
return resMsg;
}