Hi,
I have a class, let's call it User annotated with @XmlRootElement
, with some properties (name, surname etc).
I use this class for REST operations, as application/xml
.
The client will POST User class so i want to keep the values in the log.
Is there any method in jaxb to prints out this object as xml?
For instance:
log.info("Customers sent: "+user.whichMethod());
should produce this output:
Customer sent:
<user> <name>cristi</name> <surname>kevin</surname> </user>
Thanks.