[Geoserver-users] hardcoded schemalocation in wfs response

Hi,

If i make a DescribeFeatureType request, in the response, i will have hardcoded value for the schemaLocation of wfs 2.0

<xsd:import namespace=“http://www.opengis.net/wfs/2.0” schemaLocation=“jar:file:/home/fgravin/.m2/repository/org/geotools/xsd/gt-xsd-wfs/9-SNAPSHOT/gt-xsd-wfs-9-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd”/>

I would like it to be something like http://schemas.opengis.net/wfs/2.0/wfs.xsd

How could i proceed ?

Thks


Florent Gravin
Camptocamp - Chambéry
0479444492

Florent,

what GeoServer version are you using? Is this an app-schema type? If so, what is your schemaUri?

Why would you want any sort of WFS import in a WFS DescribeFeatureType response? The response should be a XSD document, and unless your feature types are defined in terms of WFS (which I would find very strange), there should be no use of the WFS schema in the payload information model.

Clients should never see classpath JAR file references.

Kind regards,
Ben.

On 14/12/12 22:16, Florent Gravin wrote:

Hi,

If i make a DescribeFeatureType request, in the response, i will have
hardcoded value for the schemaLocation of wfs 2.0

<xsd:importnamespace="http://www.opengis.net/wfs/2.0&quot;schemaLocation=&quot;jar:file:/home/fgravin/\.m2/repository/org/geotools/xsd/gt\-xsd\-wfs/9\-SNAPSHOT/gt\-xsd\-wfs\-9\-SNAPSHOT\.jar\!/org/geotools/wfs/v2\_0/wfs\.xsd&quot;/&gt;

I would like it to be something like
http://schemas.opengis.net/wfs/2.0/wfs.xsd

How could i proceed ?

Thks

--
Florent Gravin
Camptocamp - Chambéry
0479444492

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hi Ben, thanks for your reply.

what GeoServer version are you using? Is this an app-schema type? If so, what is your schemaUri?

I’m using Geoserver master branch, and yes it is an app-schema type.
My schema uri is http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd (urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0).

Why would you want any sort of WFS import in a WFS DescribeFeatureType response? The response should be a XSD document, and unless your feature types are defined in terms of WFS (which I would find very strange), there should be no use of the WFS schema in the payload information model.

I don’t really want to have this import, but it is there i haven’t customized any thing to get this i guess.
Maybe i could try to remove it but i don’t know how to process.

thanks for help

On Mon, Dec 17, 2012 at 4:03 AM, Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com> wrote:

Florent,

Why would you want any sort of WFS import in a WFS DescribeFeatureType response? The response should be a XSD document, and unless your feature types are defined in terms of WFS (which I would find very strange), there should be no use of the WFS schema in the payload information model.

Clients should never see classpath JAR file references.

Kind regards,
Ben.

On 14/12/12 22:16, Florent Gravin wrote:

Hi,

If i make a DescribeFeatureType request, in the response, i will have
hardcoded value for the schemaLocation of wfs 2.0

xsd:importnamespace="[http://www.opengis.net/wfs/2.0](http://www.opengis.net/wfs/2.0)"schemaLocation=“jar:file:/home/fgravin/.m2/repository/org/geotools/xsd/gt-xsd-wfs/9-SNAPSHOT/gt-xsd-wfs-9-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd”/

I would like it to be something like
http://schemas.opengis.net/wfs/2.0/wfs.xsd

How could i proceed ?

Thks


Florent Gravin
Camptocamp - Chambéry
0479444492


Ben Caradoc-Davies Ben.Caradoc-Davies@anonymised.com
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre


Florent Gravin
Camptocamp - Chambéry
0479444492

Hi,

Well there is some code in https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/xml/FeatureTypeSchemaBuilder.java#L369
that add the wfs schema and put a jar url for wfs.xsd

We made a hack for this but i think geoserver team should have a look about this issue.

Cheers

On Wed, Jan 2, 2013 at 11:44 AM, Florent Gravin <florent.gravin@anonymised.com> wrote:

Hi Ben, thanks for your reply.

what GeoServer version are you using? Is this an app-schema type? If so, what is your schemaUri?

I’m using Geoserver master branch, and yes it is an app-schema type.
My schema uri is http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd (urn:x-inspire:specification:gmlas:AdministrativeUnits:3.0).

Why would you want any sort of WFS import in a WFS DescribeFeatureType response? The response should be a XSD document, and unless your feature types are defined in terms of WFS (which I would find very strange), there should be no use of the WFS schema in the payload information model.

I don’t really want to have this import, but it is there i haven’t customized any thing to get this i guess.
Maybe i could try to remove it but i don’t know how to process.

thanks for help

On Mon, Dec 17, 2012 at 4:03 AM, Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com> wrote:

Florent,

Why would you want any sort of WFS import in a WFS DescribeFeatureType response? The response should be a XSD document, and unless your feature types are defined in terms of WFS (which I would find very strange), there should be no use of the WFS schema in the payload information model.

Clients should never see classpath JAR file references.

Kind regards,
Ben.

On 14/12/12 22:16, Florent Gravin wrote:

Hi,

If i make a DescribeFeatureType request, in the response, i will have
hardcoded value for the schemaLocation of wfs 2.0

xsd:importnamespace="[http://www.opengis.net/wfs/2.0](http://www.opengis.net/wfs/2.0)"schemaLocation=“jar:file:/home/fgravin/.m2/repository/org/geotools/xsd/gt-xsd-wfs/9-SNAPSHOT/gt-xsd-wfs-9-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd”/

I would like it to be something like
http://schemas.opengis.net/wfs/2.0/wfs.xsd

How could i proceed ?

Thks


Florent Gravin
Camptocamp - Chambéry
0479444492


Ben Caradoc-Davies Ben.Caradoc-Davies@anonymised.com
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre


Florent Gravin
Camptocamp - Chambéry
0479444492


Florent Gravin
Camptocamp - Chambéry
0479444492

On Wed, Jan 9, 2013 at 11:50 AM, Florent Gravin <florent.gravin@anonymised.com.1104…> wrote:

Hi,

Well there is some code in https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/xml/FeatureTypeSchemaBuilder.java#L369
that add the wfs schema and put a jar url for wfs.xsd

We made a hack for this but i think geoserver team should have a look about this issue.

Please open a bug report and attach your patch.

Also, remember that WFS 2.0 + app schema is not an officially supported combination as far as I know,
in particular, app-schema does not work well with GML 3.2 I believe.
It may take some time to get confirmation, app-schema is developed in Australia and it’s vacation time
over there now.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On 09/01/13 19:18, Andrea Aime wrote:

Also, remember that WFS 2.0 + app schema is not an officially supported
combination as far as I know,
in particular, app-schema does not work well with GML 3.2 I believe.

All reports I have are that app-schema works with GML 3.2 (I rewrote the GeoTools GML 3.2 bindings so that it did). There are production deployments using it for GeoSciML 3 and WaterML 2.

Very little of WFS 2.0 that is not in WFS 1.1 is supported. Paging will fail silently. resolveDepth is not supported. WFS 1.1 with outputformat=gml32 works well. There are namespace prefix gotchas with known workarounds.

It may take some time to get confirmation, app-schema is developed in
Australia and it's vacation time
over there now.

Too ... hot ... to ... work ...

http://www.watoday.com.au/wa-news/new-year-brings-end-to-perths-record-heatwave-20130101-2c3q8.html
http://www.australiangeographic.com.au/journal/australias-heatwave-a-taste-of-things-to-come-tim-flannery.htm

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

On 09/01/13 19:18, Andrea Aime wrote:

On Wed, Jan 9, 2013 at 11:50 AM, Florent Gravin
<florent.gravin@anonymised.com <mailto:florent.gravin@anonymised.com>>
wrote:
    Well there is some code in
    https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/xml/FeatureTypeSchemaBuilder.java#L369
    that add the wfs schema and put a jar url for wfs.xsd
    We made a hack for this but i think geoserver team should have a
    look about this issue.

Please open a bug report and attach your patch.

Florent, I wrote that method, and I am aware that it is fragile and relies on observed behaviour of the EMF libraries, rather than reason, which does not seem to apply. A patch that fixes this problem would be welcome. A unit test would be great. Can you reproduce the problem using an existing test fixture? As I said, no response should contain a jar URL.

Kind regards,

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre