public void acceptRepresentation(final Representation entity)
throws ResourceException {
final Form form = getRequest().getEntityAsForm();
final String serviceUrl = form.getFirstValue("service");
try {
final String serviceTicketId = this.centralAuthenticationService.grantServiceTicket(this.ticketGrantingTicketId, new SimpleWebApplicationServiceImpl(serviceUrl, this.httpClient));
getResponse().setEntity(serviceTicketId, MediaType.TEXT_PLAIN);
} catch (final InvalidTicketException e) {
log.error(e.getMessage(),e);
getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND, "TicketGrantingTicket could not be found.");
} catch (final Exception e) {