jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-3676

SchemaLocations on the WFS output header are invalid

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.1.x
  • Fix Version/s: 2.0.0
  • Component/s: WFS
  • Labels:
    None
  • Testcase included:
    yes

Description

On WFS output, the schema locations encoded on the header are describeFeatureType URL for that type eg.

<wfs:FeatureCollection
...
xsi:schemaLocation="urn:cgi:xmlns:CGI:GeoSciML:2.0 http://d00109:8082/geoserver-ws-0.1/wfs?service=WFS&amp;version=1.1.0&amp;request=DescribeFeatureType&amp;typeName=gsml:MappedFeature
http://www.opengis.net/wfs http://d00109:8082/geoserver-ws-0.1/schemas/wfs/1.1.0/wfs.xsd">

Users have been complaining that these schema locations wouldn't validate on XML editors (in particular XMLSpy), stopping them from doing further work.

Users can now supply schemaLocation in their app-schema mapping file eg.
<targetTypes>
<FeatureType>
<schemaUri>http://schemas.opengis.net/GeoSciML/geosciml.xsd</schemaUri>
</FeatureType>
</targetTypes>
The patch I attached fixes the schema location to encode to the provided schema URI, if there is one. Otherwise it'll encode the describeFeatureType URL by default.

Test covered in updated FeatureChainingWFSTest as well.

On the side note, the WFS schema location relates back to the host and that if the application is deployed on a separate machine, they won't be able to access the schema, eg.
"http://d00109:8082/geoserver-ws-0.1/schemas/wfs/1.1.0/wfs.xsd"
But I'm going to raise a different issue for that one and address it later.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    SISS-510.patch
    27/Nov/09 5:48 AM
    5 kB
    Rini Angreani

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Rob Atkinson added a comment - 29/Nov/09 5:26 PM

If we specify the schema, we should not create redundant info in the mapping file for the location. Schema location and namespaces should be extracted from the schema. (so kill the namespace mappings too). The patch could be seen as a workaround, pending the ability to read the schema details properly - so put a comment at least into mapping files that use it.

Show
Rob Atkinson added a comment - 29/Nov/09 5:26 PM If we specify the schema, we should not create redundant info in the mapping file for the location. Schema location and namespaces should be extracted from the schema. (so kill the namespace mappings too). The patch could be seen as a workaround, pending the ability to read the schema details properly - so put a comment at least into mapping files that use it.
Hide
Permalink
Justin Deoliveira added a comment - 02/Dec/09 7:50 AM

Patch looks good to me. But one thing though. I would reduce the level of the log statement from WARNING to some DEBUG level or else non app schema stores will get a warning for every feature request.

Show
Justin Deoliveira added a comment - 02/Dec/09 7:50 AM Patch looks good to me. But one thing though. I would reduce the level of the log statement from WARNING to some DEBUG level or else non app schema stores will get a warning for every feature request.
Hide
Permalink
Rini Angreani added a comment - 08/Dec/09 8:21 PM

Thank's Justin. I changed the log statement to CONFIG. I hope that's OK.

Committed to trunk:

Modified: src\GeoServer-trunk\src\extension\app-schema\app-schema-test\src\test\java\org\geoserver\test\FeatureChainingWfsTest.java
Modified: src\GeoServer-trunk\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java
Completed: At revision: 13760

Committed to 2.0:

Modified: src\Geoserver-2.0\src\extension\app-schema\app-schema-test\src\test\java\org\geoserver\test\FeatureChainingWfsTest.java
Modified: src\Geoserver-2.0\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java
Completed: At revision: 13761

Show
Rini Angreani added a comment - 08/Dec/09 8:21 PM Thank's Justin. I changed the log statement to CONFIG. I hope that's OK. Committed to trunk: Modified: src\GeoServer-trunk\src\extension\app-schema\app-schema-test\src\test\java\org\geoserver\test\FeatureChainingWfsTest.java Modified: src\GeoServer-trunk\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java Completed: At revision: 13760 Committed to 2.0: Modified: src\Geoserver-2.0\src\extension\app-schema\app-schema-test\src\test\java\org\geoserver\test\FeatureChainingWfsTest.java Modified: src\Geoserver-2.0\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java Completed: At revision: 13761
Hide
Permalink
Andrea Aime added a comment - 15/Dec/09 9:06 AM

I guess setting it to CONFIG is not enough. Now all simple feature requests have it in the logs:

2009-12-15 02:21:15,074 INFO [geoserver.wfs] -
Request: getServiceInfo
2009-12-15 02:21:15,084 INFO [geoserver.wfs] -
Request: getFeature
        handle = null
        service = WFS
        version = 1.1.0
        baseUrl = http://demo.opengeo.org:80/geoserver/
        providedVersion = null
        query = [net.opengis.wfs.impl.QueryTypeImpl@685a3fa9 (group: null, propertyName: null, function: null, filter: [ the_geom bbox POLYGON ((-95.341797125 44.263671625, -95.3
41797125 45.142577875, -94.462890875 45.142577875, -94.462890875 44.263671625, -95.341797125 44.263671625)) ], sortBy: null, featureVersion: null, handle: null, srsName: EPSG:432
6, typeName: [states])]
        maxFeatures = 10
        outputFormat = text/xml; subtype=gml/3.1.1
        resultType = results
        traverseXlinkDepth = null
        traverseXlinkExpiry = null
        formatOptions = {}
2009-12-15 02:21:15,084 INFO [geoserver.wfs] - Unable to find user-defined schema location for: . Using a built schema location by default: http://demo.opengeo.org/geoserver/wfs?
service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp%3Astates
2009-12-15 02:21:15,094 WARN [geotools.xml] - org.geotools.data.crs.ForceCoordinateSystemFeatureResults@57095797 (org.geotools.data.crs.ForceCoordinateSystemFeatureResults)  is n
ot of type [Lorg.opengis.feature.simple.SimpleFeature;
2009-12-15 02:21:15,724 INFO [geoserver.wfs] -

This is quite annoying...

Show
Andrea Aime added a comment - 15/Dec/09 9:06 AM I guess setting it to CONFIG is not enough. Now all simple feature requests have it in the logs:
2009-12-15 02:21:15,074 INFO [geoserver.wfs] -
Request: getServiceInfo
2009-12-15 02:21:15,084 INFO [geoserver.wfs] -
Request: getFeature
        handle = null
        service = WFS
        version = 1.1.0
        baseUrl = http://demo.opengeo.org:80/geoserver/
        providedVersion = null
        query = [net.opengis.wfs.impl.QueryTypeImpl@685a3fa9 (group: null, propertyName: null, function: null, filter: [ the_geom bbox POLYGON ((-95.341797125 44.263671625, -95.3
41797125 45.142577875, -94.462890875 45.142577875, -94.462890875 44.263671625, -95.341797125 44.263671625)) ], sortBy: null, featureVersion: null, handle: null, srsName: EPSG:432
6, typeName: [states])]
        maxFeatures = 10
        outputFormat = text/xml; subtype=gml/3.1.1
        resultType = results
        traverseXlinkDepth = null
        traverseXlinkExpiry = null
        formatOptions = {}
2009-12-15 02:21:15,084 INFO [geoserver.wfs] - Unable to find user-defined schema location for: . Using a built schema location by default: http://demo.opengeo.org/geoserver/wfs?
service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp%3Astates
2009-12-15 02:21:15,094 WARN [geotools.xml] - org.geotools.data.crs.ForceCoordinateSystemFeatureResults@57095797 (org.geotools.data.crs.ForceCoordinateSystemFeatureResults)  is n
ot of type [Lorg.opengis.feature.simple.SimpleFeature;
2009-12-15 02:21:15,724 INFO [geoserver.wfs] -
This is quite annoying...
Hide
Permalink
Rini Angreani added a comment - 15/Dec/09 8:12 PM

I'll change it to FINEST. Sorry about that.

Show
Rini Angreani added a comment - 15/Dec/09 8:12 PM I'll change it to FINEST. Sorry about that.
Hide
Permalink
Rini Angreani added a comment - 15/Dec/09 9:17 PM

Changed to finer actually.

GS-trunk:
Modified: src\Geoserver-trunk\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java
Completed: At revision: 13813.

GS-2.0:
Modified: src\Geoserver-2.0\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java
Completed: At revision: 13814

Show
Rini Angreani added a comment - 15/Dec/09 9:17 PM Changed to finer actually. GS-trunk: Modified: src\Geoserver-trunk\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java Completed: At revision: 13813. GS-2.0: Modified: src\Geoserver-2.0\src\wfs\src\main\java\org\geoserver\wfs\xml\GML3OutputFormat.java Completed: At revision: 13814
Hide
Permalink
Andrea Aime added a comment - 28/Nov/10 2:58 AM

Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

Show
Andrea Aime added a comment - 28/Nov/10 2:58 AM Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

People

  • Assignee:
    Andrea Aime
    Reporter:
    Rini Angreani
Vote (0)
Watch (1)

Dates

  • Created:
    27/Nov/09 5:44 AM
    Updated:
    28/Nov/10 2:58 AM
    Resolved:
    08/Dec/09 8:21 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.