marshaller.marshal(position, writer);
String positionString = writer.toString();
logger.debug("Position converted to XML:\n" + positionString);
// Write out the schema (for debugging purposes)
jaxbContext.generateSchema(new DefaultSchemaOutputResolver("target"));
// Read it from XML
Position positionRead = (Position) jaxbContext
.createUnmarshaller()
.unmarshal(new StringReader(positionString));