}
// Store the TGT
KerberosTicket tgt = getKerberosTicket(clientSubject, null);
// Get the service ticket
KerberosClientAction action =
new KerberosClientAction(clientPrincipals.iterator().next(), serviceName);
byte[] ticket = Subject.doAs(clientSubject, action);
if (ticket == null) {
throw new WSSecurityException(
WSSecurityException.ErrorCode.FAILURE, "kerberosServiceTicketError"
);