[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] Re: [Geoserver-devel] We're generating invalid dates in GML....
|
Yup. The new bindings use the jaxb data binding classes to specifically
serialize as xml.
Andrea Aime wrote:
> Justin Deoliveira ha scritto:
>> Hmmm, I am surprised the wfs 1.0 cite tests pass as they do a lot of
>> testing against dates... But i guess that is just date and not datetime
>> so that makes sense.
>
> Hmm... that's suprising nonetheless... attributes encoding in Geotools
> FeatureTranslator is handled in FeatureTranslator.handleAttribute:
>
> if (Geometry.class.isAssignableFrom(value.getClass())) {
> geometryTranslator.encode((Geometry) value, srsName);
> } else {
> String text = value.toString();
> contentHandler.characters(text.toCharArray(), 0,
> text.length());
> }
>
> Sooo.... it seems to me it was working only because of sheer luck? :-)
>
> Looking at the FeatureTypeEncoder, every subclass of java.util.Date
> will be turned into a xs:datetime, so I guess wfs 1.0 passed only
> because we use Postgis as the backing store, which was configured
> to use a date type, and returned as a result a java.sql.Date that
> toStrings to something which is in the format CCYY-MM-dd, apparently
> another format supported by xs:datetime.
>
> Cheers
> Andrea
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
> !DSPAM:1004,45eda27113981116498154!
>
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org