jaxb entity print out as xml

Posted by Cristian Boariu on Stack Overflow See other posts from Stack Overflow or by Cristian Boariu
Published on 2010-03-17T09:53:18Z Indexed on 2010/03/17 11:51 UTC
Read the original article Hit count: 292

Filed under:
|

Hi, I have a class, let's say User adnotated 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 jax-ws to prints out this object as xml?

For instance: log.info("Customers sent a USER"+user.whichMethod());

    Customer sent a User
    <user> <name>cristi</name> <surname>kevin</surname> </user>

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about jaxb