GetFeature namespaces and schemas location

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 - 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* - 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 - 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* - http://www.opengis.net/wfs"
>>>> >>xmlns:fire="http://picasso.dlsi.uji.es/schemas/oklahoma/fire* - http://picasso.dlsi.uji.es/schemas/oklahoma/fire"
>>>> >>xmlns:gml="http://www.opengis.net/gml* - http://www.opengis.net/gml"
>>>> >>xmlns:ntadfhwa_uza="http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza* - http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza"
>>>> >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance* - http://www.w3.org/2001/XMLSchema-instance"
>>>> >>xsi:schemaLocation="*http://picasso.dlsi.uji.es/schemas/oklahoma/fire - http://picasso.dlsi.uji.es/schemas/oklahoma/fire
>>>> >>http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
>>>> >>http://www.opengis.net/wfs - http://www.opengis.net/wfs
>>>> >>http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-basic.xsd* - http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-basic.xsd*">
>>>> >>- <#> <gml:boundedBy>
>>>> >>- <#> <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#13869* - http://www.opengis.net/gml/srs/epsg.xml#13869">
&gt;&gt;&gt;&gt; &gt;&gt; &lt;gml:coordinates decimal="<b>.</b>" cs="<b>,</b>" ts=""&gt;-98.53723199,34.5322885
&gt;&gt;&gt;&gt; &gt;&gt;-98.53723199,36.59758438 -94.43181798,36.59758438
&gt;&gt;&gt;&gt; &gt;&gt;-94.43181798,34.5322885&lt;/gml:coordinates&gt;
&gt;&gt;&gt;&gt; &gt;&gt; &lt;/gml:Box&gt;
&gt;&gt;&gt;&gt; &gt;&gt; &lt;/gml:boundedBy&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;So, when I try to validate de response with a xml validator I get the
&gt;&gt;&gt;&gt; &gt;&gt;following errors:
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt; * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
&gt;&gt;&gt;&gt; &gt;&gt; starting with element 'fire:fire'. One of
&gt;&gt;&gt;&gt; &gt;&gt; '
{"http://www.opengis.net/gml":_Feature}
' is expected.
&gt;&gt;&gt;&gt; &gt;&gt; * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
&gt;&gt;&gt;&gt; &gt;&gt; starting with element 'fire:fire'. One of
&gt;&gt;&gt;&gt; &gt;&gt; '
{"http://www.opengis.net/gml":_Feature}
' is expected.
&gt;&gt;&gt;&gt; &gt;&gt; * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
&gt;&gt;&gt;&gt; &gt;&gt; starting with element 'fire:fire'. One of
&gt;&gt;&gt;&gt; &gt;&gt; '
{"http://www.opengis.net/gml":_Feature}
' is expected.
&gt;&gt;&gt;&gt; &gt;&gt; * ERROR at line 2: cvc-complex-type.2.4.a: Invalid content was found
&gt;&gt;&gt;&gt; &gt;&gt; starting with element 'fire:fire'. One of
&gt;&gt;&gt;&gt; &gt;&gt; '
{"http://www.opengis.net/gml":_Feature}
' is expected.
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;.
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;I think the bug is in this line:
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;xsi:schemaLocation="*http://picasso.dlsi.uji.es/schemas/oklahoma/fire - http://picasso.dlsi.uji.es/schemas/oklahoma/fire
&gt;&gt;&gt;&gt; &gt;&gt;http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire* - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire*
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;because *ntadfhwa_uza and **fire prefixes belong to distinct namespaces
&gt;&gt;&gt;&gt; &gt;&gt;(**http://picasso.dlsi.uji.es/schemas/oklahoma/fire - http://picasso.dlsi.uji.es/schemas/oklahoma/fire and
&gt;&gt;&gt;&gt; &gt;&gt;*http://picasso.dlsi.uji.es/schemas/oklahoma/*ntadfhwa_uza*and - http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza*and
&gt;&gt;&gt;&gt; &gt;&gt;**respectively) , so geoserver should generate something similar to this:
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;<b>xsi:schemaLocation="</b>http://picasso.dlsi.uji.es/schemas/oklahoma/fire - http://picasso.dlsi.uji.es/schemas/oklahoma/fire
&gt;&gt;&gt;&gt; &gt;&gt;http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;*http://picasso.dlsi.uji.es/schemas/oklahoma/*ntadfhwa_uza* - http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza*
&gt;&gt;&gt;&gt; &gt;&gt;http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=**ntadfhwa_uza:ntadfhwa_uza - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=**ntadfhwa_uza:ntadfhwa_uza"*
&gt;&gt;&gt;&gt; &gt;&gt;*
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;Any suggestion???
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;*
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;&gt;&gt; &gt;&gt;
&gt;&gt;
&gt;&gt;&gt; &gt;
&gt;&gt;&gt; &gt;
&gt;&gt;&gt; &gt;
&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; When I make the following request I get the following, which is correct:
&gt;&gt;
&gt;&gt; Request:
&gt;&gt;
&gt;&gt; http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
&gt;&gt;
&gt;&gt;
&gt;&gt; Response:
&gt;&gt; &lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
&gt;&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
&gt;&gt; elementFormDefault="qualified" attributeFormDefault="unqualified"
&gt;&gt; version="1.0"&gt;
&gt;&gt; &lt;xs:import
&gt;&gt; namespace="http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza"
&gt;&gt; schemaLocation="http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza"
&gt;&gt; /&gt;
&gt;&gt; &lt;xs:import
&gt;&gt; namespace="http://picasso.dlsi.uji.es/schemas/oklahoma/fire"
&gt;&gt; schemaLocation="http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire"
&gt;&gt; /&gt;
&gt;&gt; &lt;/xs:schema&gt;
&gt;&gt;
&gt;&gt; So, as you can see, each import has its own namespace uri and the schema
&gt;&gt; location.
&gt;&gt;
&gt;&gt; But when I make this request:
&gt;&gt;
&gt;&gt; http://localhost:8080/geoserver/wfs/GetFeature?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire - http://localhost:8080/geoserver/wfs/GetFeature?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
&gt;&gt;
&gt;&gt; I get the following response (attached to this email is the complete
&gt;&gt; response):
&gt;&gt;
&gt;&gt;
&gt;&gt; &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&gt;&gt; - &lt;wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"
&gt;&gt; xmlns:fire="http://picasso.dlsi.uji.es/schemas/oklahoma/fire"
&gt;&gt; xmlns:gml="http://www.opengis.net/gml"
&gt;&gt; xmlns:ntadfhwa_uza="http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza"
&gt;&gt; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
&gt;&gt; xsi:schemaLocation="http://picasso.dlsi.uji.es/schemas/oklahoma/fire
&gt;&gt; http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
&gt;&gt; http://www.opengis.net/wfs - http://www.opengis.net/wfs
&gt;&gt; http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-basic.xsd - http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-basic.xsd"&gt;
&gt;&gt; - &lt;gml:boundedBy&gt;
&gt;&gt; - &lt;gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#13869"&gt;
&gt;&gt; &lt;gml:coordinates decimal="." cs="," ts=""&gt;-98.53723199,34.5322885
&gt;&gt; -98.53723199,36.59758438 -94.43181798,36.59758438
&gt;&gt; -94.43181798,34.5322885&lt;/gml:coordinates&gt;
&gt;&gt; &lt;/gml:Box&gt;
&gt;&gt; &lt;/gml:boundedBy&gt;
&gt;&gt; - &lt;gml:featureMember&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; So, as you can see, the xml is saying that you can find the schema
&gt;&gt; through
&gt;&gt; http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza,fire:fire
&gt;&gt; and that it has the namespace uri
&gt;&gt; http://picasso.dlsi.uji.es/schemas/oklahoma/fire - http://picasso.dlsi.uji.es/schemas/oklahoma/fire.
&gt;&gt;
&gt;&gt; But that isn't true, because the correct would be this:
&gt;&gt;
&gt;&gt; xsi:schemaLocation="http://picasso.dlsi.uji.es/schemas/oklahoma/fire
&gt;&gt; http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=fire:fire
&gt;&gt; http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza:ntadfhwa_uza - http://picasso.dlsi.uji.es/schemas/oklahoma/ntadfhwa_uza:ntadfhwa_uza
&gt;&gt; http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza - http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=ntadfhwa_uza:ntadfhwa_uza"
&gt;&gt;
&gt;&gt; because they belong to two different namespace

Environment

None

Activity

Show:
codehaus
April 10, 2015, 4:28 PM

CodeHaus Comment From: cholmes - Time: Sat, 27 Mar 2004 06:17:45 -0600
---------------------
<p>Fixed in cvs, will be in 1.2.0</p>

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

None

Priority

Medium
Configure