On behalf of my colleague, who’s developing a WFS client using GeoTools:
Greetings,
I have been building the client side of a Java WFS application using GeoTools and I’m a little stuck implementing the DescribeFeature option. Once I get a response from the server, I’m lost as to how to translate the XML text into a SimpleFeatureType or other usable object.
The first thing I tried was to create a WFS_1_1_0_DataStore and use its getSchema(String typeName) method and that works most of the time, but does not seem to work well for certain servers.
So I implemented my own query and it successfully gets an appropriate XML response from the server, but there doesn’t seem to be a convenient way to parse the text into something usable.
You probably want to ask on the geotools list.
(the code to parse describe feature results is inside the wfsdatastore)
Jody
On 06/11/2010, at 5:01 AM, phony baloney wrote:
On behalf of my colleague, who’s developing a WFS client using GeoTools:
Greetings,
I have been building the client side of a Java WFS application using GeoTools and I’m a little stuck implementing the DescribeFeature option. Once I get a response from the server, I’m lost as to how to translate the XML text into a SimpleFeatureType or other usable object.
The first thing I tried was to create a WFS_1_1_0_DataStore and use its getSchema(String typeName) method and that works most of the time, but does not seem to work well for certain servers.
So I implemented my own query and it successfully gets an appropriate XML response from the server, but there doesn’t seem to be a convenient way to parse the text into something usable.