adding a format to parsing OGC service exceptions (WMS 1.1 WMS 1.3 WFS 1.0 and OWSCommon 1.0 and 1.1) and hooking it up into the GetCapabilities parsers, r=tschaub (closes #2234)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2011-06-08 14:39:12 +00:00
parent 9d5ab38fc0
commit 2b04fd6c34
15 changed files with 505 additions and 17 deletions
+15
View File
@@ -2,6 +2,15 @@
<head>
<script src="../../OLLoader.js"></script>
<script type="text/javascript">
function test_read_exception(t) {
t.plan(1);
var xml = document.getElementById("exceptionsample").firstChild.nodeValue;
var doc = new OpenLayers.Format.XML().read(xml);
var format = new OpenLayers.Format.WMSCapabilities();
var obj = format.read(doc);
t.ok(!!obj.error, "Error reported correctly");
}
function test_read(t) {
@@ -678,6 +687,12 @@ Changes:
</Capability>
</WMT_MS_Capabilities>
--></div>
<div id="exceptionsample"><!--
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1"><ServiceException> Plain text message about an error. </ServiceException>
</ServiceExceptionReport>
--></div>
<!--
GeoServer example below taken from
http://publicus.opengeo.org/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities