public Object getObject(InputStream stream, Map parameters) throws ConverterException {
try {
ReferenceFieldHandler.setObjectMap((Map)parameters.get("objectmap"));
Unmarshaller unmarshaller = new Unmarshaller((Mapping)this.mappings.get(parameters.get("profiletype")));
Object result = unmarshaller.unmarshal(new InputSource(stream));
stream.close();
return result;
} catch (MappingException e) {
throw new ConverterException("can't create Unmarshaller", e);
} catch (Exception e) {