>
> Geoserver 2.2.4 using Jetty on Windows Server 2008.
>
> We're pulling several layers from SQL Server and I'm trying to get a list
> of field names for each layer using WFS's DescribeFeatureType request.
>
> All layers are published in GeoServer with the same settings (Same polygon
> style, same SRS, etc.) but some layers don't list their field names in
> DescribeFeatureType and others do. Can anyone shed some light on why this
> might be?
>
> Eg. when I request
>
> http://myserver/geoserver/wfs?request=DescribeFeatureType&typeName=MNS:geofence_static
> I get:
>
> <xsd:schema elementFormDefault="qualified" targetNamespace="
> http://www.mydomain.net/tracking/MNS">
> <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="
> http://myserver/geoserver/schemas/gml/3.2.1/gml.xsd"/>
> <xsd:complexType name="geofence_staticType">
> <xsd:complexContent>
> <xsd:extension base="gml:AbstractFeatureType">
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="1"
> name="ogr_fid" nillable="false" type="xsd:int"/>
> <xsd:element maxOccurs="1" minOccurs="0"
> name="ogr_geometry" nillable="true" type="gml:GeometryPropertyType"/>
> <xsd:element maxOccurs="1" minOccurs="0"
> name="aeroway" nillable="true" type="xsd:string"/>
> </xsd:sequence>
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
> <xsd:element name="geofence_static"
> substitutionGroup="gml:AbstractFeature" type="MNS:geofence_staticType"/>
> </xsd:schema>
>
> If I request
>
> http://myserver/geoserver/wfs?request=DescribeFeatureType&typeName=MNS:GeoFence
> I simply get:
>
> <xsd:schema elementFormDefault="qualified" targetNamespace="
> http://www.mydomain.net/tracking/MNS">
> <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="
> http://myserver/geoserver/schemas/gml/3.2.1/gml.xsd"/>
> </xsd:schema>
>
>
> I can't see any reason that one is returning the field names, but not the
> other.
>
I think I have a lead but not a solution. I hadn't noticed that the log
file is logging a backtrace despite returning valid XML. The backtrace is:
2013-05-07 15:09:07,730 WARN [geoserver.wfs] - Could not build xml schema
for type: GeoFence
java.lang.NullPointerException: Could not find a type for property: ID of
type: java.util.UUID
at
org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildComplexSchemaContent(FeatureTypeSchemaBuilder.java:743)
at
org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildSchemaContent(FeatureTypeSchemaBuilder.java:664)
at
org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildSchemaInternal(FeatureTypeSchemaBuilder.java:234)
at
org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:147)
at
org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:141)
at
org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:130)
at
org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder.doWrite(XmlSchemaEncoder.java:106)
In SQL Server we do have the ID field defined as type 'uniqueidentifier'.
Is there a way to add support for type java.util.UUID, or do I need to
rework my database tables?
Thank you,
Michael Moore
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users