DescribeFeature fails if no namespace is declared
-------------------------------------------------
Key: GEOS-1185
URL: http://jira.codehaus.org/browse/GEOS-1185
Project: GeoServer
Issue Type: Improvement
Components: WFS
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Priority: Blocker
Fix For: 1.6.0
The following request fails:
<!-- A sample describe request. The schema is generated automatically by -->
<!-- GeoServer. You can modify the schema with the web interface to hide -->
<!-- and/or require certain attributes. -->
<!--
If you change the "<TypeName>" tag below to the name of another
dataset, you can see the GML Schema for that layer.
This will have all the column names and types.
The getCapabilities demo will tell you the names of all the layers!
-->
<DescribeFeatureType
version="1.0.0"
service="WFS"
xmlns="http://www.opengis.net/wfs"
xmlns:topp="http://www.openplans.org/topp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<TypeName>tiger:coastline</TypeName>
</DescribeFeatureType>
It fails because the parsed QName has no Namespace information, but only prefix one. This is because the "tiger" namespace
hasn't been declared. DescribeFeatureType will compare namespaces, not prefixes, making the type not found.
I'm wondering how to handle this the general way. Could we override somehow the QName parsing so that if the
Namespace is not declared, the prefix is used to access the Geoserver catalog and populate the namespace anyways?
It would be a way to make a patch in just one point, instead of chasing all users of QName.getLocalPart.
I can fix this one myself, just need your advice on how to address it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira