try {
OutputStream outStream = csb.getOutputStream();
XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(outStream, DEFAULT_CHARSET);
writer.writeStartDocument(DEFAULT_CHARSET, XML_VERSION);
XmlPropertyEntityProducer ps = new XmlPropertyEntityProducer(false);
ps.append(writer, propertyInfo, value);
writer.flush();
csb.closeWrite();
return ODataResponse.entity(csb.getInputStream()).build();