- MapInfo Pro version 15.0 (and 16, too, I believe)
- Geoserver version 2.12.0 publishing WFS data
The WFS layer is opening in MapInfo 15.0 and is editable, as required, but any "Date" fields are not displaying within MapInfo - fields are blank. I can enter a date into one of these fields and save it OK - it's going through to the database store in Geoserver - but it still doesn't appear in MapInfo. All "date" fields are blank upon refresh.
A DescribeFeatureType call on the layer in question includes the following XML showing two fields with types "xsd:date" and "xsd:dateTime"
<xsd:complexType name="nat_dev_polygons_testType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="proj_id" nillable="true" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="0" name="proj_stage" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="afr" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geostore_update_date" nillable="true" type="xsd:date"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geostore_update_timestamp" nillable="true" type="xsd:dateTime"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geom" nillable="true" type="gml:GeometryPropertyType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
The data for a single record returned by a GetFeature call includes the following XML:
<gml:featureMember>
<GeoStore:nat_dev_polygons_test fid="nat_dev_polygons_test.217073">
<GeoStore:proj_id>35233</GeoStore:proj_id>
<GeoStore:proj_stage>17242690</GeoStore:proj_stage>
<GeoStore:afr>1.724269E7</GeoStore:afr>
<GeoStore:geostore_update_date>2017-11-23</GeoStore:geostore_update_date>
<GeoStore:geostore_update_timestamp>2017-11-23T14:30:44.715</GeoStore:geostore_update_timestamp>
When this data appears in a MapInfo WFS TAB file, the "date" field (of MapInfo type "Date") is empty, and the "dateTime" field (of MapInfo type "Char (32)") correctly displays the timestamp (although as a text string).
- Is this an XML schema problem? The xsd namespace in the XML is coming from: xmlns:xsd="http://www.w3.org/2001/XMLSchema" Do I need to reference an alternative namespace / schema in order for WFS data to flow correctly to MapInfo?
- What XML schema mapping is being used by MapInfo? "xsd:date" fields are obviously being cast to "Date" column types in MapInfo - even though the data is then not being read correctly. "xsd:dateTime" fields, on the other hand, are being mapped to "Char (32)" column types in MapInfo. Where is this configuration set, and is it editable?
I note the following (very brief) entry which suggests that the cause is due to the user's system settings - but that doesn't seem right to me. Surely this can be addressed by means other than changing an entire system locale setting...
The following link is no longer available. To access this information, copy the title found in the url into the search tool on the top nav bar, or try searching for key words in the post. https://li360.pitneybowes.com/s/article/MapInfo-Pro-12-5-2-Dates-are-ignored-when-getting-WFS-data?t=1512100875996
Any suggestions (or, better still, proven solutions!) most welcome! 😊
Cheers,
David