/** * Generate the ExceptionReport as an XML string. * * @return the ExceptionReport as an XML string */ public String getXMLExceptionReport() { Map<String, String> suggestedPrefixes = new HashMap<String, String>(); suggestedPrefixes.put("http://www.opengis.net/ows/2.0", "ows"); XmlOptions opts = new XmlOptions(); opts.setSavePrettyPrint(); opts.setSaveSuggestedPrefixes(suggestedPrefixes); opts.setSaveNamespacesFirst(); opts.setSaveAggressiveNamespaces(); opts.setUseDefaultNamespace(); return exceptionReportDoc.xmlText(opts); }