cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Token to Log In

DellSC
Active Contributor
0 Kudos

We're working on an app that will use both the .NET SDK and the RESTFul Web Services SDK for various parts of its processing.  The .NET SDK is used to log in to the system to verify a user and to get various information that is not available through the RESTful SDK.  The RESTFul SDK is used to replace code that used to use the ReportEngine to get parameter info about a Webi report and to get an OpenDocument URL for viewing a report.

The client that this is for has a limited number of concurrently licenses, so the goal is to log in using the .NET SDK, get a logon token that is valid for 100 minutes and 50 logon, then log out to release the session.  Then each time that the SDK needs to access BO, logon using the token, do the work, and then log out again.  However, I haven't been able to find any code for using this token for logging in to the RESTful web services.  Is this possible?  Or do I have to have a Serialized Session,which means logging in twice - once with the .NET SDK to get the session and then again into RESTful to get the report info?

Does anyone have any thoughts on this?

-Dell

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor
0 Kudos

Hi Dell,

Since you are logging on through several different contexts (.NET (IIS), OpenDocument (Tomcat) and WACS (java server), your best choice for session management would most likely be to use a serialized session.  This should not increase your license usage when crossing application boundaries.

for openDocument, pass the serialized session using the serSes parameter.  note the actual token is quite long and can exceed URL character limits, so pass it using a POST.

For restful, you can pass the serialized session using :

POST /biprws/logon/token    <== you can also use this with the logon token you are currently using

with the following body:

  <attrs xmlns="http://www.sap.com/rws/bip">
       <attr name="tokenType" type="string">serializedSession</attr>

        <attr name="logonToken" type="string">sessionstringhere</attr>

  </attrs>

This will return an X-SAP-LogonToken to be used for successive rest calls.  the serialized session must be xml encoded.

Dan

Answers (0)