[Geoserver-devel] [jira] Created: (GEOS-2181) Layers in the default namespace must be qualified (the ones in the other namespace do not?)

Layers in the default namespace must be qualified (the ones in the other namespace do not?)
-------------------------------------------------------------------------------------------

                 Key: GEOS-2181
                 URL: http://jira.codehaus.org/browse/GEOS-2181
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.7.0-RC1
            Reporter: Andrea Aime
            Assignee: Justin Deoliveira
             Fix For: 1.7.0-RC2

Looking into GEOS-2126 I've set up three layers with the same name, and different namespace:
- topp:states (usual shapefile)
- cite:states (same shapefile as above, different namespace)
- sde:states (shapefile exported to postgis, one column removed to make sure the feature type was not the same)

Now, the two following three requests do work fine:

{code}
<DescribeFeatureType
  version="1.0.0" service="WFS"
  xmlns="http://www.opengis.net/wfs&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
  http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
    <TypeName>sde:states</TypeName>
</DescribeFeatureType>

<DescribeFeatureType
  version="1.0.0" service="WFS"
  xmlns="http://www.opengis.net/wfs&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
  http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
    <TypeName>cite:states</TypeName>
</DescribeFeatureType>

<DescribeFeatureType
  version="1.0.0" service="WFS"
  xmlns="http://www.opengis.net/wfs&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
  http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
    <TypeName>states</TypeName>
</DescribeFeatureType>
{code}

Note that none declares the prefix, but all return the proper result. What's a bit shocking is that the following one breaks:

{code}
<DescribeFeatureType
  version="1.0.0" service="WFS"
  xmlns="http://www.opengis.net/wfs&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
  http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
    <TypeName>topp:states</TypeName>
</DescribeFeatureType>

resulting in:

{code}
"java.lang.RuntimeException: Parsing failed for TypeName: java.lang.IllegalArgumentException: prefix topp is not bound to a namespace
Parsing failed for TypeName: java.lang.IllegalArgumentException: prefix topp is not bound to a namespace
prefix topp is not bound to a namespace"
{code}

This happens only with xml requests. It seems the topp schema is bound with the "" prefix but not with the "topp" prefix?

--
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