if (parentTypeConverter != null) {
// lets convert the object to a JAXB source and try convert that to
// the required source
JAXBContext context = createContext(value.getClass());
// must create a new instance of marshaller as its not thread safe
Marshaller marshaller = context.createMarshaller();
Writer buffer = new StringWriter();
boolean prettyPrint = isPrettyPrint();
// check the camel context property to decide the value of PrettyPrint
if (exchange != null) {
String property = exchange.getContext().getProperty(PRETTY_PRINT);