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:
@@ -5,6 +5,7 @@
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Format/XML.js
|
||||
* @requires OpenLayers/Format/OGCExceptionReport.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -67,6 +68,11 @@ OpenLayers.Format.WFSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
}
|
||||
var parser = new constr(this.options);
|
||||
var capabilities = parser.read(data);
|
||||
if (capabilities.service === undefined) {
|
||||
// an error must have happened, so parse it and report back
|
||||
var format = new OpenLayers.Format.OGCExceptionReport();
|
||||
capabilities.error = format.read(data);
|
||||
}
|
||||
capabilities.version = version;
|
||||
return capabilities;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user