on 03-22-2018 6:50 PM
Is there a way to convert (or generate) a logon token that was generated using the BI Platform .Net SDK to a format that I can be used by the BI Platform RESTful SDK?
Hi Craig,
Yes, you can do this. You create a REST token by logging in to REST web services with the SDK token.
One thing to be aware of is that as soon as the SDK token is invalidated (logged off, timed out etc) the REST token is invalidated as well.
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. I don't appear to have access to that page.
** edit 0 **
Looks like I need to POST to `http://localhost:6405/biprws/logon/token` with an XML body of:
<attrs xmlns="http://www.sap.com/rws/bip">
<attr name="tokenType" type="string" possibilities="token,serializedSession">token</attr>
<attr name="logonToken" type="string" null="true">[.Net logon token]</attr>
</attrs>
What is a serializedSession?
** edit 1 **
This PowerShell code returns an `Enter a valid input (RWS 000079)` exception:
$token = 'server.domain.tld:6400@...' # .net sdk token
$server=($token-split':')[0] # grab 'server.domain.tld' from token
$url="http://$server`:6405/biprws/logon/long"
$headers= @{}
$headers.Add("Content-Type","application/xml") # sending
$headers.Add("Accept","application/xml") # receiving
$payload=`
@"
<attrs xmlns="http://www.sap.com/rws/bip">
<attr name="tokenType" type="string" possibilities="token,serializedSession">token</attr>
<attr name="logonToken" type="string">$token</attr>
</attrs>
"@
Invoke-WebRequest-Uri $url-Method Post -Headers $headers-Body $payload
Thoughts?
Hopefully you were able to access the documentation. I did have to edit the link since the first one I posted was a draft copy.
don't use: /logon/long.
use: /logon/token
so your "edit 0" looks like the correct POST and Body.
A Serialized session is created similiar to a logontoken in the sdk. retrieve the string with
myEnterpriseSession.SerializedSession
If BOE version is 4.2 SP03 + , use version 1 APIs (http://host:port/biprws/v1/logon/token).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Returns <code>Invalid logon token: . (FWM 02080)</code> for the BI Platform 4.2 Support Pack 4 (14.2.4.2410).
If you are sending serialized session :
<attrs xmlns="http://www.sap.com/rws/bip">
<attr name="clienttype" type="string"></attr>
<attr name="logontoken" type="string">put_token_here</attr>
<attr name="tokentype" type="string" possibilities="token, serializedSession">serializedSession</attr>
</attrs>
Yes, see my comments earlier in the thread.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.