You can do it like this :
CreateExemptionCertificate cc = ...;
JAXBContext context = JAXBContext.newInstance(CreateExemptionCertificate.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
StringWriter sw = new StringWriter();
m.marshal(cc, sw);
String result = sw.toString();