@Produces(MediaType.APPLICATION_XML)
@Consumes(MediaType.APPLICATION_XML)
@POST
public List<JAXBElement<Book>> echoJAXBElementBookList(List<JAXBElement<Book>> bookElements) {
List<JAXBElement<Book>> ret = new ArrayList<JAXBElement<Book>>();
Author author = null;
Author retAuthor = null;
Book retBook = null;
for(JAXBElement<Book> bookElement : bookElements) {
author = bookElement.getValue().getAuthor();
retAuthor = new Author();
retAuthor.setFirstName("echo " + author.getFirstName());
retAuthor.setLastName("echo " + author.getLastName());
retBook = new Book();
retBook.setAuthor(retAuthor);
retBook.setTitle("echo " + bookElement.getValue().getTitle());
JAXBElement<Book> element = new JAXBElement<Book>(new QName("book"), Book.class, retBook);
ret.add(element);