use of com.peterphi.std.guice.restclient.jaxb.RestFailure in project stdlib by petergeneric.
the class RemoteExceptionClientResponseFilter method parseResponse.
private RestFailure parseResponse(InputStream stream) throws IOException, JAXBException {
stream.reset();
final JAXBContext ctx = jaxbContextResolver.getContext(RestFailure.class);
final JAXBElement<RestFailure> el = ctx.createUnmarshaller().unmarshal(new StreamSource(stream), RestFailure.class);
return el.getValue();
}
Aggregations