public HTTPErrorToCougarExceptionTransformer(FaultUnMarshaller faultUnMarshaller) {
super(faultUnMarshaller);
}
public Exception convert(final InputStream inputStream, final ExceptionFactory exceptionFactory, final int httpStatusCode) {
CougarFault fault = getFaultFromInputStream(inputStream);
ResponseCode responseCode = ResponseCodeMapper.getResponseCodeFromHttpCode(httpStatusCode, fault);
return exceptionFactory.parseException(responseCode, fault.getErrorCode(),
fault.getFaultCode() + " fault received from remote server: "+ ServerFaultCode.getByDetailCode(fault.getErrorCode()), fault.getDetail().getFaultMessages());
}