Created
October 17, 2020 12:27
-
-
Save floverfelt/adfa0cc4730ed8eb8c8a3f3d4ecc7045 to your computer and use it in GitHub Desktop.
Creating an iServerSession with MSTR Web SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static WebIServerSession getAdminWebIServerSession(String mstrServerName, int mstrServerPort, String mstrProjectName, String mstrUsername, | |
String mstrPassword) throws WebObjectsException { | |
WebIServerSession webIServerSession = WebObjectsFactory.getInstance().getIServerSession(); | |
// Spawn adminSession for work | |
webIServerSession.setServerName(mstrServerName); | |
webIServerSession.setServerPort(mstrServerPort); | |
webIServerSession.setProjectName(mstrProjectName); | |
webIServerSession.setLogin(mstrUsername); | |
webIServerSession.setPassword(mstrPassword); | |
// WebSDK code is defined as a CustomApp | |
webIServerSession.setApplicationType(EnumDSSXMLApplicationType.DssXmlApplicationCustomApp); | |
// Reconnect forces re-validation of session | |
webIServerSession.reconnect(); | |
return webIServerSession; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment