Log In
The login method returns a LoginResult. We determine success or failure from the isSuccess field. Notes about the success or failure are available in the message field. The sessionId field is used throughout the rest of the API.
private static String login(String username, String password) throws Exception {
LoginResult loginResult = port.login(username, password);
if (!loginResult.isSuccess()) {
throw new Exception("login failed: " + loginResult.getMessage());
}
return loginResult.getSessionId();
}
Last modified date: 12/17/2021