Skip to Content

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

BO SDK URL地址提示情况

输入地址http://sever:6405/biprws/raylight/v1/documents/258099/parameters?lovInfo=false,提示No session found in HTTP hader X-SAP-LogonToken,提示找不到会话,这个会话怎么在这个URL里进行添加。

Former Member
replied

您好,您可能没充分理解restful的用法,它不是说简单的在URL里添加在浏览器打开使用的,它是需要您在您应用程序进行调用的,像您提到的X-SAP-LogonToken,也是需要通过程序的方法添加到http header里的,实现方法视不同的语言是不同的,以java为例,大概的sample code是这样的:

        HttpClient httpClient = new DefaultHttpClient();

        String url="http://sever:6405/biprws/raylight/v1/documents/258099/parameters?lovInfo=false";

        HttpGet httpGet = new HttpGet(url);

        httpGet.setHeader("X-SAP-LogonToken","\""+token+"\"");

        HttpResponse httpResponse = httpClient.execute(httpGet);

这里的HttpClient的类,是来自org.apache.http的包。

当然您在执行这个之前,是需要事先登陆取得token,这样才能填给X-SAP-LogonToken

取token的话需要用到post方法和这个restful的url

http://server:6405/biprws/logon/long

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question