how to serialize Java Object to xml

how can serialize the response of webservices SOAP using java?

I’ve tried parsed the answer with DOM Parser but I want to create a java object to assign the values.

I’m using IDE netbeans