@POST
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public String create(Card card) {
Card createdCard = null;
log.info("Entering createNewCard...");
createdCard = cardSvc.create(card, pm);
System.out.println("createdCard = " + createdCard.getId());
if (createdCard.getKey() == null) {
throw new WebApplicationException(400);
}
log.info("Leaving createNewCard...");
pm.close();
return createdCard.getId();
}