MicroStrategy ONE
Connecting and Authenticating against an Intelligence Server
This example demonstrates how to connect to MicroStrategy Intelligence Server.
Code sample
1. WebObjectsFactory woFact = WebObjectsFactory.getInstance();
2. WebIServerSession webSS = (WebIServerSession)woFact.getIServerSession();
3. webSS.setServerName("IServer");
4. webSS.setLogin("Administrator");
5. webSS.setPassword("");
6. webSS.setProjectName("MyProject");
7. webSS.setApplicationType(EnumDSSXMLApplicationType.DssXmlApplicationCustomApp);
8. String sessionID = webSS.getSessionID();
Explanation
Lines 1-7 connect to a project supplying the name of the Intelligence Server to which to connect, the name of the project, and authentication credentials. Line 8 creates a valid session.