Xml does not support embbeding binary data directly, you need to convert it to a text string. Usually base64 is used to do this.
Try to encode image data in python and convert it back to binary stream in java.
python:
aux = {
'location_id' : location['id'],
'name' : location['name'] or " ",
'units' : location['units'] or 0.0,
'area' : location['area'] or 0.0,
'day_meter' : location['day_meter'] or 0.0,
'free' : location['free'] or 0.0,
'type' : location['type'] or " ",
'loc_type' : location['loc_type'] or " ",
'image' : base64.b64encode(str(location['image'])),
}
java
byte[] image = javax.xml.bind.DatatypeConverter.parseBase64Binary(aux.get("image").toString());