code: private RestFailure parseLegacyResponse(InputStream stream) throws IOException, JAXBException
  	{
  		stream.reset();
  
  		final String xmlAsString = FileHelper.cat(stream);
  
  		final String modifiedXml = xmlAsString.replace("http://ns.mediasmithsforge.com/stdlib/rest/exception",
  		                                               "http://ns.peterphi.com/stdlib/rest/exception");
  
  		final JAXBContext ctx = jaxbContextResolver.getContext(RestFailure.class);
  		final JAXBElement<RestFailure> el = ctx.createUnmarshaller().unmarshal(new StreamSource(new StringReader(modifiedXml)),
  		                                                                       RestFailure.class);
  
  		return el.getValue();
  	}
docs: This implementation is quite ugly (in particular the fact that XML is being processed as a string!) but it's only required
  very short-term as a patch to ease communication with services that are being migrated from the legacy mediasmiths
  codebase
  to the open source stdlib
  
  @param stream
  
  @return
  
  @throws IOException