use of ogc.schema.opengis.wfs.exception.v_1_0_0.ServiceExceptionType in project ddf by codice.
the class WfsResponseExceptionMapper method convertToWfsException.
private WfsException convertToWfsException(ServiceExceptionReport report) {
WfsException wfsException = null;
List<ServiceExceptionType> list = new ArrayList<ServiceExceptionType>(report.getServiceException());
if (list.size() > 0) {
Collections.reverse(list);
StringBuilder exceptionMsg = new StringBuilder();
for (ServiceExceptionType serviceException : list) {
exceptionMsg.append(serviceException.getValue());
}
wfsException = new WfsException(exceptionMsg.toString());
}
if (null == wfsException) {
wfsException = new WfsException("Empty Service Exception Report (version = " + report.getVersion() + ")");
}
return wfsException;
}
Aggregations