GeoServer 2.3 不会为具有空值的列返回空 XML 节点。例如,这是从 WFS 对 CQL 查询的响应中提取的片段:
<gml:featureMember>
<ems:airports fid="airports.3822">
<ems:IKO>KINL</ems:IKO>
<ems:na3>US24271</ems:na3>
<ems:Name>FALLS INTL</ems:Name>
<ems:Type>Civilian/Public</ems:Type>
<ems:the_geom>...</ems:the_geom>
<ems:Mod_time>2011-09-02T20:17:30.831</ems:Mod_time>
</ems:airports>
</gml:featureMember>
<gml:featureMember>
<ems:airports fid="airports.10117">
<ems:IKO>CKV3</ems:IKO>
<ems:Name>DRYDEN BEST WESTERN (Heli)</ems:Name>
<ems:the_geom>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">-92.833333,49.783333</gml:coordinates>
</gml:Point>
</ems:the_geom>
<ems:Mod_time>2011-09-08T16:56:07.334</ems:Mod_time>
<ems:Country>Canada</ems:Country>
<ems:Operator>Best Western Motor Inn</ems:Operator>
<ems:Contact>807-223-3201</ems:Contact>
</ems:airports>
</gml:featureMember>
第二个 featureMember 元素缺少 na3 和 Type 节点,因为它们在数据库中为空。
有没有办法将 GeoServer 配置为在遇到具有空值的列时返回空节点?