繁体   English   中英

Geoserver 和 Openlayers - 在 WFS-T 中显示详细的消息错误

[英]Geoserver and Openlayers - Show detailed message error in WFS-T

我已按照此示例在带有地理服务器的 openlayers map 中保存/编辑元素

地理服务器层通过 postgis 连接到 postgres 数据库; 在 postgis 中,我添加了有关插入新记录的某些约束,即两个多边形不能相互接触/不能包含另一个多边形

如何使用 openlayers 显示这些约束错误? 使用 WFS-T 插入请求,我只收到以下消息:

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://myserver:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
    <ows:Exception exceptionCode="InvalidParameterValue">
        <ows:ExceptionText>Update error: Error occured updating features</ows:ExceptionText>
    </ows:Exception>
</ows:ExceptionReport>

我可以在 geoserver 中获取整个堆栈跟踪并确保触发了什么约束,有没有办法通过 openlayers 获得更多细节?

全局设置页面中,您可以选中显示include stack trace in service exception的框,以在返回给 OpenLayers 的 XML 中提供堆栈跟踪。

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM