I have a class, call it User annotated with @XmlRootElement , with some properties (first name, last name, etc.).
I use this class for REST operations, like application/xml .
The client will be a POST User class, so I want to save the values ββin a log.
Is there any method in jaxb to print this object as xml ?
For instance:
log.info("Customers sent: "+user.whichMethod());
should produce this conclusion:
Customer sent:
<user> <name>cristi</name> <surname>kevin</surname> </user>
Thanks.
source share