* @return a {@link WFSException} containing the server returned exception report messages
* @see WFSResponseParser#parse(WFSProtocol, WFSResponse)
*/
public Object parse(WFS_1_1_0_DataStore wfs, WFSResponse response) {
WFSConfiguration configuration = new WFSConfiguration();
Parser parser = new Parser(configuration);
InputStream responseStream = response.getInputStream();
Charset responseCharset = response.getCharacterEncoding();
Reader reader = new InputStreamReader(responseStream, responseCharset);
Object parsed;
try {
parsed = parser.parse(reader);
if (!(parsed instanceof net.opengis.ows10.ExceptionReportType)) {
return new IOException("Unrecognized server error");
}
} catch (Exception e) {
return new WFSException("Exception parsing server exception report", e);