Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

restful web servers提取的提示对象

这种方法提取的提示对象该如何存储SESSION呢?

代码是:

request.setCharacterEncoding("UTF-8");

String boUsername = (String)request.getSession().getAttribute("username");

String boPassword = (String)request.getSession().getAttribute("password");

String[] a = request.getParameter("url").split(" ");

String title = (new String(a[1].getBytes("ISO_8859_1"),"GBK"));

String boAuthType = "secEnterprise";

String reportID = "";

if(a==null){

reportID = "303826";

}else{

reportID = a[0];

}

final String baseURL = http://server:6405/biprws;

final String logonURL = baseURL + "/logon/long";

final String logoffURL = baseURL + "/logoff";

final String baseWebiURL = baseURL + "/raylight/v1/documents";

String Parameter = "";

try{

String xmlString = "";

String documentID = "";

String logonToken = "";

xmlString = "<attrs><attr name=\"userName\" type=\"string\" >"

+boUsername

+"</attr><attr name=\"password\" type=\"string\">"

+boPassword

+"</attr><attr name=\"auth\" type=\"string\" possibilities=\"secEnterprise,secLDAP,secWinAD,secSAPR3\">"

+boAuthType + "</attr></attrs>";

String logonXML = restPost(logonURL,xmlString,"","","","");

logonToken = "\"" + getLogonTokenFromXML(logonXML) + "\"";

Former Member
Not what you were looking for? View more on this topic or Ask a question