private ExceptionReport parseExceptionReport_100(OperationResult result) throws XmlException {
String requestResult = new String(result.getIncomingResult());
ExceptionReportDocument exceptionReportDocument = ExceptionReportDocument.Factory.parse(requestResult);
String language = exceptionReportDocument.getExceptionReport().getLang();
String version = exceptionReportDocument.getExceptionReport().getVersion();
ExceptionReport exceptionReport = new ExceptionReport(version, language);
ExceptionType[] exceptions = exceptionReportDocument.getExceptionReport().getExceptionArray();
for (ExceptionType exceptionType : exceptions) {
String exceptionCode = exceptionType.getExceptionCode();
String[] exceptionMessages = exceptionType.getExceptionTextArray();
if ("ResponseExceedsSizeLimit".equalsIgnoreCase(exceptionCode)) {
String errorMsg = Arrays.toString(exceptionMessages);
errorMsg = errorMsg.replace("[", "").replace("]", "");
throw new ResponseExceedsSizeLimitException(errorMsg);
}
String locator = exceptionType.getLocator();
String sentRequest = result.getSendedRequest();
OWSException owsException = new OWSException(exceptionMessages, exceptionCode, sentRequest, locator);
exceptionReport.addException(owsException);
}
return exceptionReport;
}