protected RetrieveDocumentSetResponseType processRequest(T body) {
Exchange result = process(body);
Exception exception = Exchanges.extractException(result);
if (exception != null) {
log.debug(getClass().getSimpleName() + " service failed", exception);
RetrievedDocumentSet errorResponse = new RetrievedDocumentSet(
exception,
ErrorCode.REPOSITORY_METADATA_ERROR,
ErrorCode.REPOSITORY_ERROR,
homeCommunityId);
if (homeCommunityId != null) {
errorResponse.getErrors().get(0).setLocation(homeCommunityId);
}
return EbXML30Converters.convert(errorResponse);
}
return Exchanges.resultMessage(result).getBody(RetrieveDocumentSetResponseType.class);
}
}