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:
@@ -2,6 +2,23 @@
|
||||
<head>
|
||||
<script src="../../OLLoader.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_read_exception(t) {
|
||||
t.plan(1);
|
||||
var parser = new OpenLayers.Format.WFSCapabilities();
|
||||
var text = '<?xml version="1.0" encoding="UTF-8"?>' +
|
||||
'<ows:ExceptionReport language="en" version="1.0.0"' +
|
||||
' xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"' +
|
||||
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">' +
|
||||
' <ows:Exception locator="foo" exceptionCode="InvalidParameterValue">' +
|
||||
' <ows:ExceptionText>Update error: Error occured updating features</ows:ExceptionText>' +
|
||||
' <ows:ExceptionText>Second exception line</ows:ExceptionText>' +
|
||||
' </ows:Exception>' +
|
||||
'</ows:ExceptionReport>';
|
||||
|
||||
var obj = parser.read(text);
|
||||
t.ok(!!obj.error, "Error reported correctly");
|
||||
}
|
||||
|
||||
function test_read(t) {
|
||||
t.plan(33);
|
||||
|
||||
Reference in New Issue
Block a user