} else {
rootObject = invocation.getAction();
}
// }
if(rootObject == null){
OperResult jsonResult = new OperResult();
jsonResult.setFailed(OPERRESULT_IS_NULL);
/**!
* 按照当前会话的语言设置输出的语言
*/
Map<String,Object> sessionMap = invocation.getInvocationContext().getSession();
if(sessionMap.containsKey(WebVariable.I18N_ATTRIBUTE_NAME)){
// System.out.println("contains WW_TRANS_I18N_LOCALE:"+sessionMap.get("WW_TRANS_I18N_LOCALE").toString());
jsonResult.MakeI18NInfoMSG(I18nUtils.getLocaleFromString(sessionMap.get(WebVariable.I18N_ATTRIBUTE_NAME).toString()));
}else{
jsonResult.MakeI18NInfoMSG(I18nUtils.getLocaleFromString(WebVariable.DEFAULT_I18N));
}
json = JSONObject.fromObject(jsonResult).toString();
}else{
if(rootObject instanceof String){
json = rootObject.toString();
}else if(rootObject instanceof OperResult){
OperResult jsonResult = (OperResult)rootObject;
/**!
* 按照当前会话的语言设置输出的语言
*/
Map<String,Object> sessionMap = invocation.getInvocationContext().getSession();
if(sessionMap.containsKey(WebVariable.I18N_ATTRIBUTE_NAME)){
// System.out.println("contains WW_TRANS_I18N_LOCALE:"+sessionMap.get("WW_TRANS_I18N_LOCALE").toString());
jsonResult.MakeI18NInfoMSG(I18nUtils.getLocaleFromString(sessionMap.get(WebVariable.I18N_ATTRIBUTE_NAME).toString()));
}else{
jsonResult.MakeI18NInfoMSG(I18nUtils.getLocaleFromString(WebVariable.DEFAULT_I18N));
}
json = JSONObject.fromObject(rootObject).toString();
}else if(rootObject instanceof Object[]){
json = JSONArray.fromObject(rootObject).toString();
}else if(rootObject instanceof List){