digiDocServicePortType.mobileAuthenticate(personalCode, countryCode, phone, language, serviceName, loginMessage, generateSPChallenge(),
messagingMode, 0, false, false, sessCode, result,
personalCodeHolder, firstName, lastName, new StringHolder(), new StringHolder(), new StringHolder(), challenge,
new StringHolder(), new StringHolder());
} catch (RemoteException e) {
throw new AuthenticationException(e);
}
if (!"OK".equals(result.value))
throw new AuthenticationException(valueOf(result.value));
return new MobileIDSession(sessCode.value, challenge.value, firstName.value, lastName.value, personalCodeHolder.value);
}