switch (er.getResultType()) {
case Success:
return (SimpleResponseMap) er.getResult();
case Fault:
CougarException cex = er.getFault();
if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
String className = cex.getFault().getDetail().getDetailMessage();
if (className.equals("SimpleException")) {
throw new SimpleException(
cex.getResponseCode(),
SimpleExceptionErrorCodeEnum.valueOf(exceptionParams.get(0)[1]),
(exceptionParams.get(1)[1])
);
}