[Geoserver-devel] [jira] Created: (GEOS-104) GetFeature namespaces and schemas location

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=GEOS-104

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: GEOS-104
    Summary: GetFeature namespaces and schemas location
       Type: Bug

     Status: Open
   Priority: Major

Original Estimate: Unknown
Time Spent: Unknown
  Remaining: Unknown

    Project: GeoServer

   Assignee: Chris Holmes
   Reporter: Miguel Ángel Esbrí Palomares

    Created: Thu, 4 Mar 2004 7:53 AM
    Updated: Thu, 4 Mar 2004 7:53 AM
Environment: windows xp os, geoserver 1.1.1

Description:
Oh, I see what you're saying. Sorry for being dense. I need to think
about it. You are correct - I remember not quite finishing all the
support for multiple namespaces. If you could file this as a bug on the
jira task tracker at
http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311 that would be
super helpful. Put the fix version of 1.2.0 and I'll be sure to hit it
before the next release (my time is tight right now or I'd do it right
away - and if you feel like digging through the code and contributing a
fix that would be great).

thanks,

Chris

On Mon, 1 Mar 2004, Miguel Ángel Esbrí wrote:

Chris Holmes wrote:

>What does the response to
>
>
>

>>http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire*
>>
>>

>look like? It shouldn't need two imports there, as that
>DescribeFeatureType response should actually just be two different imports
>of the namespaces, which the validator would then follow and get the
>actual schemas. So basically geoserver puts the two imports in that
>describe feature type statement.
>
>If you could email me the full response to the GetFeature request, as well
>as to the describe request with both and the describe requests with one
>each, along with the catalog.xml, info.xml and schema.xml files if you
>used them I can try to diagnose the problem. GeoServer has been tested
>through the CITE conformance tests for this, so it should work, it's
>likely an error with configuration.
>
>Chris
>
>On Fri, 27 Feb 2004, Miguel Ángel Esbrí wrote:
>
>
>

>>When I write the following request -->
>>http://myserver:8080/geoserver/wfs?request=GetFeature&typename=ntadfhwa_uza:ntadfhwa_uza,fire:fire
>>I get the following:
>>
>><?xml version="1.0" encoding="UTF-8" ?>
>>- <#> <wfs:FeatureCollection xmlns:wfs="*http://www.opengis.net/wfs*&quot;
>>xmlns:fire="*http://picasso.dlsi.uji.es/schemas/oklahoma/fire*&quot;
>>xmlns:gml="*http://www.opengis.net/gml*&quot;
>>xmlns:ntadfhwa_uza="*http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza*&quot;
>>xmlns:xsi="*http://www.w3.org/2001/XMLSchema-instance*&quot;
>>xsi:schemaLocation="*http://picasso.dlsi.uji.es/schemas/oklahoma/fire
>>http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
>>http://www.opengis.net/wfs
>>http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-basic.xsd*&quot;&gt;
>>- <#> <gml:boundedBy>
>>- <#> <gml:Box srsName="*http://www.opengis.net/gml/srs/epsg.xml#13869*&quot;&gt;
>> <gml:coordinates decimal="*.*" cs="*,*" ts="">-98.53723199,34.5322885
>>-98.53723199,36.59758438 -94.43181798,36.59758438
>>-94.43181798,34.5322885</gml:coordinates>
>> </gml:Box>
>> </gml:boundedBy>
>>
>>.
>>.
>>.
>>.
>>.
>>.
>>
>>So, when I try to validate de response with a xml validator I get the
>>following errors:
>>
>> * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
>> starting with element 'fire:fire'. One of
>> '{"http://www.opengis.net/gml&quot;:\_Feature\}' is expected.
>> * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
>> starting with element 'fire:fire'. One of
>> '{"http://www.opengis.net/gml&quot;:\_Feature\}' is expected.
>> * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
>> starting with element 'fire:fire'. One of
>> '{"http://www.opengis.net/gml&quot;:\_Feature\}' is expected.
>> * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
>> starting with element 'fire:fire'. One of
>> '{"http://www.opengis.net/gml&quot;:\_Feature\}' is expected.
>>
>>.
>>.
>>.
>>.
>>.
>>
>>
>>I think the bug is in this line:
>>
>>xsi:schemaLocation="*http://picasso.dlsi.uji.es/schemas/oklahoma/fire
>>http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire*
>>
>>because *ntadfhwa_uza and **fire prefixes belong to distinct namespaces
>>(**http://picasso.dlsi.uji.es/schemas/oklahoma/fire and
>>**http://picasso.dlsi.uji.es/schemas/oklahoma/**ntadfhwa_uza**and
>>**respectively) , so geoserver should generate something similar to this:
>>
>>*xsi:schemaLocation="*http://picasso.dlsi.uji.es/schemas/oklahoma/fire
>>http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire
>>
>>**http://picasso.dlsi.uji.es/schemas/oklahoma/**ntadfhwa_uza**
>>http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=**ntadfhwa_uza:ntadfhwa_uza&quot;\*
>>*
>>
>>Any suggestion???
>>
>>
>>
>>*
>>
>>
>>
>>

>
>
>

When I make the following request I get the following, which is correct:

Request:

http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire

Response:
  <?xml version="1.0" encoding="ISO-8859-1" ?>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema&quot;
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="1.0">
  <xs:import
namespace="http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza&quot;
schemaLocation="http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza&quot;
/>
  <xs:import
namespace="http://picasso.dlsi.uji.es/schemas/oklahoma/fire&quot;
schemaLocation="http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire&quot;
/>
  </xs:schema>

So, as you can see, each import has its own namespace uri and the schema
location.

But when I make this request:

http://localhost:8080/geoserver/wfs/GetFeature?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire

I get the following response (attached to this email is the complete
response):

<?xml version="1.0" encoding="UTF-8" ?>
- <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:fire="http://picasso.dlsi.uji.es/schemas/oklahoma/fire&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ntadfhwa_uza="http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://picasso.dlsi.uji.es/schemas/oklahoma/fire
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
http://www.opengis.net/wfs
http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
- <gml:boundedBy>
- <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#13869&quot;&gt;
  <gml:coordinates decimal="." cs="," ts="">-98.53723199,34.5322885
-98.53723199,36.59758438 -94.43181798,36.59758438
-94.43181798,34.5322885</gml:coordinates>
  </gml:Box>
  </gml:boundedBy>
- <gml:featureMember>

So, as you can see, the xml is saying that you can find the schema
through
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
and that it has the namespace uri
http://picasso.dlsi.uji.es/schemas/oklahoma/fire.

But that isn't true, because the correct would be this:

xsi:schemaLocation="http://picasso.dlsi.uji.es/schemas/oklahoma/fire
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire
http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza:ntadfhwa_uza
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza&quot;

because they belong to two different namespace

---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira