Marshaller marshaller = jaxbContextFactory.createMarshaller(object.getClass());
StringWriter stringWriter = new StringWriter();
marshaller.marshal(object, stringWriter);
template.body(stringWriter.toString());
} catch (JAXBException e) {
throw new EncodeException(e.toString(), e);
}
}