[Geoserver-devel] [jira] Created: (GEOS-3866) Query's typeName attribute not correctly parsed when using XML POST

Query's typeName attribute not correctly parsed when using XML POST
-------------------------------------------------------------------

                 Key: GEOS-3866
                 URL: http://jira.codehaus.org/browse/GEOS-3866
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 2.0.1
         Environment: WindowsXP, java 1.6.10_7; Linux/Debian (Lenny), java 1.6.0_12.
            Reporter: Daniele Benegiamo
            Assignee: Andrea Aime

As stated from WFS 1.1.0 specifications, Query's "typeName" attribute should be a comma separated list of feature type names to query (with optional alias assignments). Unfortunately it's value is not parsed correctly when using XML POST method, it fails when:
- multiple type names are used (as "topp:tasmania_roads,topp:tasmania_cities"), it don't split the string (i.e., it read "topp" as namespace and "tasmania_roads,topp:tasmania_cities" as feature type name); *this make impossible to perform join queries*;
- aliases are used (as "topp:tasmania_roads=x", as before it reads "topp" as namespace and "tasmania_roads=x" as type name);
- if "strict CITE compliance" is enabled, type names with underscores are not matched.

Example that fails, using multiple type names:
{code:xml}
<wfs:GetFeature service="WFS" version="1.1.0"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;&gt;
  <wfs:Query typeName="topp:tasmania_roads,topp:tasmania_cities">
    <ogc:Filter>
      <ogc:BBOX>
        <ogc:PropertyName>the_geom</ogc:PropertyName>
        <gml:Envelope srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
           <gml:lowerCorner>147.17973 -43.06686</gml:lowerCorner>
           <gml:upperCorner>147.40877 -42.68815</gml:upperCorner>
        </gml:Envelope>
      </ogc:BBOX>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>
{code}

The same using GET request works:
{code}
http://localhost:8080/geoserver/wfs?service=WFS&request=GetFeature&version=1.1.0&typeName=topp:tasmania_roads,topp:tasmania_cities&BBOX=147.17973,-43.06686,147.40877,-42.68815,EPSG:4326
{code}

But in this later case setting an alias (escaping the '=' symbol with '%3D') fails (e.g. "tasmania_roads%3Da" is read as "tasmania_roads=a").

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