3. Create a new HTTP request.
4. Add the Content-Type attribute to the request header, and set its value to application/xml.
5. Fill out the XML template and add it to the request body.
Set the value of the <attr name ="tokenType" type="string"> element to be token if you are using a
session token, and set it to
serializedSession if you are using a serialized session. Set the value of the
<attr name="logonToken" type="string"> element to an XML-encoded version of the serialized
session or session token value.
<attrs xmlns="http://www.sap.com/rws/bip">
<attr name="tokenType" type="string" possibilities="token,
serializedSession">serializedSession</attr>
<attr name="logonToken" type="string">3&ua=AWmaEx4Z.NVPpAEthuTGAjc,
8P&ub=AfRWaT5_131NlLLf5bRMLKY,8P&S5,88&
5U=5320JaqlNvF1mr4m8u5UQFadItj5319JWKkfBwlKLBfrgXC8Npg1jC,8P&
63=secEnterprise,8P&2r=COMMANDCOM-LCM:6400,8P&3k=@COMMANDCOM-LCM:
6400,8P&1=Administrator account,8P&W={},?z&
4E=5319JWKkfBwlKLBfrgXC8Npg1jC,8P&Tn={3&.1={3&
2=726,03&O=FavoritesFolder,0P},2z&.2={3&
2=727,03&O=PersonalCategory,0P},2z&.3={3&2=728,03&O=Inbox,0P},
2z&U=3,03},?z&4F=12,8P&Tm=36500,83&uy=-1043,8L&
35=Administrator,8P&ux=AeiCInd_R6lBrV98duvX1dc,8P&pa,8P</attr>
</attrs>
Note
This example shows a serialized session. The serialized session or session token value must be XML-
encoded to remove illegal XML characters. For example, replace the & character with &.
6. Use the POST method to send the request to the same URL, http://<baseURL>/logon/token. Replace
<baseURL> with the base URL for RESTful web services.
POST http://localhost:6405/biprws/logon/token
The response header returns the logon token as the X-SAP-LogonToken attribute.
X-SAP-LogonToken:"COMMANDCOM-LCM:
6400@{3&2=5595,U3&p=40674.9596541551,Y7&4F=12,U3&63=secEnterprise,
0P&66=60,03&68=secEnterprise:Administrator,
0P&qe=100,U3&vz=SFY6agrLPxpfQBK1ZKYCwoBZKCbfsQm7VgWZFiH.RhM,UP"
The logon token is contained between the quotation marks.
Note
The response body contains a copy of the logon token in the <attr> element. If the logon token contains
characters that are illegal in XML, they are replaced with their XML-encoded value. For example, the &
character is replaced with &. To use a logon token taken from the response body, you must convert the
XML-encoded logon token back to its original format.
The following example shows how the XML-encoded logon token appears in the response body:
<entry xmlns="http://www.w3.org/2005/Atom">
<author><name>@COMMANDCOM-LCM:6400</name></author>
<id>tag:sap.com,2010:bip-rs/logon/token</id>
<title type="text">Logon Result</title>
<updated>2011-06-28T17:54:31.994Z</updated>
<content type="application/xml">
42
P U B L I C
Business Intelligence Platform RESTful Web Service Developer Guide
Using the SDK