|
// 登录X5平台
public static String login() throws UnknownHostException {
log.info("X5 Login to start !");
String bSessionID = "";
try {
String businessServer = PropertiesUtil.getValue("x5.businessServer");
String loginName = PropertiesUtil.getValue("x5.loginName");
String password = PropertiesUtil.getValue("x5.password");
// 获得本地IP地址
String localIP = java.net.InetAddress.getLocalHost().getHostAddress();
// 初始化动作引擎
ActionEngine.init(businessServer);
// 返回bSessionID
bSessionID = ActionEngine.login(loginName, ActionUtils.md5(password), localIP, null);
} catch (UnknownHostException e) {
log.error("X5 Login to error :", e);
throw e;
}
log.info("X5 Login to end !");
return bSessionID;
}
执行到 ActionEngine.init(businessServer); 此行后,直接跳出方法体,导致没办法获取bSessionID ,没有报错。
|
|