if ( sessionId == null || sessionId.trim().length() == 0
|| id == null || id.trim().length() == 0
|| username == null || username.trim().length() == 0
|| role == null || role.trim().length() == 0
) {
if ( ! xa.containsTag("success") ) {
// unexpected response.
throw new Exception("Unexpected: server did not respond with a success nor an error message. Please try again later.");
}
else {
throw new Exception("Could not parse response from registry server. Please try again later. response=" +response);