I´m using JAXB to marshall an Java object to XML.
I want to make a web service where i put this code and return the xml, but the last line where i do the marshall doesn´t return a string because it´s a handler.
JAXBContext context = JAXBContext.newInstance(Person.class);
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
Person person = new Person("Anonymous", 32, "employee");
marshaller.marshal(person, System.out);
Has anyone done this before?