Geoflo
November 27, 2008, 12:21pm
1
Hallo,
I discovered a strange behavior of Geoserver 1.7.0 with the timestamp
attribute of my postgis database.
When I'd like to INSERT data via WFS-T I have to write:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" ; version="1.0.0"
service="WFS">
<wfs:Insert>
...
<feature:zeit>2006-02-27T23:08:12</feature:zeit>
...
</wfs:Insert>
</wfs:Transaction>
When I use the same time format for updating, I get an error. I have to
encode time the following way:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" ; version="1.0.0"
service="WFS">
<wfs:Update typeName="cctv:cams">
...
<wfs:Property>
<wfs:Name>zeit</wfs:Name>
<wfs:Value>2006-02-27 23:08:12</wfs:Value>
</wfs:Property>
...
</wfs:Update>
</wfs:Transaction>
Why is it possible that a "T" can make such a difference?
Regards,
Florian
--
View this message in context: http://www.nabble.com/Problems-when-insert-or-update-time-with-wfs-tp20718370p20718370.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hmmm... looks like you have uncovered a bug. When you try the update request with the first version of the timestamp do you get an error? Or just that nothing gets updated?
Geoflo wrote:
Hallo,
I discovered a strange behavior of Geoserver 1.7.0 with the timestamp
attribute of my postgis database.
When I'd like to INSERT data via WFS-T I have to write:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" ; version="1.0.0"
service="WFS">
<wfs:Insert>
...
<feature:zeit>2006-02-27T23:08:12</feature:zeit>
...
</wfs:Insert>
</wfs:Transaction>
When I use the same time format for updating, I get an error. I have to
encode time the following way:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" ; version="1.0.0"
service="WFS">
<wfs:Update typeName="cctv:cams">
...
<wfs:Property>
<wfs:Name>zeit</wfs:Name>
<wfs:Value>2006-02-27 23:08:12</wfs:Value>
</wfs:Property>
...
</wfs:Update>
</wfs:Transaction>
Why is it possible that a "T" can make such a difference?
Regards,
Florian
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
Geoflo
November 28, 2008, 1:37pm
3
Update with 2008-11-26T12:22:42.75
<wfs:TransactionResult>
<wfs:Status>
<wfs:FAILED/>
</wfs:Status>
<wfs:Message>update error</wfs:Message>
</wfs:TransactionResult>
2008-11-28 14:29:59,343 WARN [data.postgis] - Some sort of database
connection error: Unzulässiger Wert für den Typ timestamp :
2008-11-26T12:22:42.75.
2008-11-28 14:29:59,375 ERROR [geoserver.wfs] - Transaction failed
org.geoserver.wfs.WFSTransactionException: update error
Insert with 2006-02-27 23:08:12
<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> ;
<ServiceException>
java.lang.RuntimeException: Parsing failed for zeit:
java.lang.IllegalArgumentException: Failed to parse dateTime 2006-02-27
23:08:12 at: 23:08:12
...
</ServiceException>
</ServiceExceptionReport>
2008-11-28 14:34:55,875 ERROR [geoserver.ows] -
java.lang.RuntimeException: Parsing failed for zeit:
java.lang.IllegalArgumentException: Failed to parse dateTime 2006-02-27
23:08:12 at: 23:08:12
--
View this message in context: http://www.nabble.com/Problems-when-insert-or-update-time-with-wfs-tp20718370p20734578.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
After looking into this I realized it is a known problem:
http://jira.codehaus.org/browse/GEOS-2210
We can hopefully get it into 1.7.2.
-Justin
Geoflo wrote:
Update with 2008-11-26T12:22:42.75
<wfs:TransactionResult>
<wfs:Status>
<wfs:FAILED/>
</wfs:Status>
<wfs:Message>update error</wfs:Message>
</wfs:TransactionResult>
2008-11-28 14:29:59,343 WARN [data.postgis] - Some sort of database
connection error: Unzulässiger Wert für den Typ timestamp :
2008-11-26T12:22:42.75.
2008-11-28 14:29:59,375 ERROR [geoserver.wfs] - Transaction failed
org.geoserver.wfs.WFSTransactionException: update error
Insert with 2006-02-27 23:08:12
<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> ;
<ServiceException>
java.lang.RuntimeException: Parsing failed for zeit:
java.lang.IllegalArgumentException: Failed to parse dateTime 2006-02-27
23:08:12 at: 23:08:12
...
</ServiceException>
</ServiceExceptionReport>
2008-11-28 14:34:55,875 ERROR [geoserver.ows] - java.lang.RuntimeException: Parsing failed for zeit:
java.lang.IllegalArgumentException: Failed to parse dateTime 2006-02-27
23:08:12 at: 23:08:12
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.