But even if we worked around that there are a bunch of other issues -
WARNING: DESCRIBE_FEATURETYPE request returned null content type for URL
http://ogc.geo-ide.developpement-durable.gouv.fr/wxs?REQUEST=DescribeFeatureType&MAP=/opt/data/carto/geoide-catalogue/1.4/org_38102/811a8b21-2526-4eb9-bfaf-ffe61175a313.internet.map&VERSION=1.0.0&SERVICE=WFS
2018-01-09T14:07:51.225+0000 WARNING Error occured getting schema
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Premature end
of file.
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResourceImpl.java:342)
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResourceImpl.java:370)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl.java:679)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl.java:790)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
at org.geotools.xml.Schemas.parse(Schemas.java:329)
at org.geotools.xml.Schemas.parse(Schemas.java:294)
at org.geotools.xml.Schemas.parse(Schemas.java:256)
at org.geotools.xml.XSD.buildSchema(XSD.java:281)
at org.geotools.xml.XSD.getSchema(XSD.java:232)
at org.geotools.xml.SchemaLocator.locateSchema(SchemaLocator.java:96)
at org.geotools.xml.Schemas.findSchemas(Schemas.java:167)
at
org.geotools.data.wfs.internal.parsers.EmfAppSchemaParser.parseFeatureType(EmfAppSchemaParser.java:297)
at
org.geotools.data.wfs.internal.parsers.EmfAppSchemaParser.parse(EmfAppSchemaParser.java:217)
at
org.geotools.data.wfs.internal.DescribeFeatureTypeResponse.<init>(DescribeFeatureTypeResponse.java:65)
at
org.geotools.data.wfs.internal.parsers.DescribeFeatureTypeResponseFactory.createResponse(DescribeFeatureTypeResponseFactory.java:62)
at
org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:220)
at
org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:1)
at
org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:445)
at
org.geotools.data.wfs.internal.WFSClient.internalIssueRequest(WFSClient.java:298)
at org.geotools.data.wfs.internal.WFSClient.issueRequest(WFSClient.java:360)
at
org.geotools.data.wfs.WFSDataStore.getRemoteFeatureType(WFSDataStore.java:210)
at
org.geotools.data.wfs.WFSDataStore.getRemoteSimpleFeatureType(WFSDataStore.java:264)
at
org.geotools.data.wfs.WFSFeatureSource.buildFeatureType(WFSFeatureSource.java:370)
at
org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:356)
at
org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:325)
at
org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:80)
at
org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:583)
at
org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:114)
at com.ianturton.cookbook.input.FetchWFS.getData(FetchWFS.java:187)
at com.ianturton.cookbook.input.FetchWFS.main(FetchWFS.java:67)
Caused by: org.xml.sax.SAXParseExceptionpublicId:
file:/tmp/N_ZONE_REG_PPRN_20060184_S_0815591013354703089221.xsd; systemId:
file:/tmp/N_ZONE_REG_PPRN_20060184_S_0815591013354703089221.xsd;
lineNumber: 1; columnNumber: 1; Premature end of file.
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResourceImpl.java:333)
... 30 more
2018-01-09T14:07:51.246+0000 SEVERE Failed to execute request
http://ogc.geo-ide.developpement-durable.gouv.fr/wxs?REQUEST=DescribeFeatureType&MAP=/opt/data/carto/geoide-catalogue/1.4/org_38102/811a8b21-2526-4eb9-bfaf-ffe61175a313.internet.map&VERSION=1.0.0&SERVICE=WFS
Exception in thread "main" java.lang.RuntimeException:
org.geotools.data.DataSourceException: No XSDElementDeclaration found for {
http://mapserver.gis.umn.edu/mapserver}N_ZONE_REG_PPRN_20060184_S_081
at
org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:358)
at
org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:325)
at
org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:80)
at
org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:583)
at
org.geotools.data.store.ContentFeatureSource.getFeatures(ContentFeatureSource.java:114)
at com.ianturton.cookbook.input.FetchWFS.getData(FetchWFS.java:187)
at com.ianturton.cookbook.input.FetchWFS.main(FetchWFS.java:67)
Caused by: org.geotools.data.DataSourceException: No XSDElementDeclaration
found for {
http://mapserver.gis.umn.edu/mapserver}N_ZONE_REG_PPRN_20060184_S_081
at
org.geotools.data.wfs.internal.parsers.EmfAppSchemaParser.parseFeatureType(EmfAppSchemaParser.java:306)
at
org.geotools.data.wfs.internal.parsers.EmfAppSchemaParser.parse(EmfAppSchemaParser.java:217)
at
org.geotools.data.wfs.internal.DescribeFeatureTypeResponse.<init>(DescribeFeatureTypeResponse.java:65)
at
org.geotools.data.wfs.internal.parsers.DescribeFeatureTypeResponseFactory.createResponse(DescribeFeatureTypeResponseFactory.java:62)
at
org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:220)
at
org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.java:1)
at
org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:445)
at
org.geotools.data.wfs.internal.WFSClient.internalIssueRequest(WFSClient.java:298)
at org.geotools.data.wfs.internal.WFSClient.issueRequest(WFSClient.java:360)
at
org.geotools.data.wfs.WFSDataStore.getRemoteFeatureType(WFSDataStore.java:210)
at
org.geotools.data.wfs.WFSDataStore.getRemoteSimpleFeatureType(WFSDataStore.java:264)
at
org.geotools.data.wfs.WFSFeatureSource.buildFeatureType(WFSFeatureSource.java:370)
at
org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:356)
... 6 more
And the server hasn't defined any Projections
<!--
WARNING: Mandatory mapfile parameter: (at least one of) MAP.PROJECTION,
LAYER.PROJECTION or wfs/ows_srs metadata was missing in this context.
-->
amongst other warnings.
Ian
On 9 January 2018 at 13:58, Ian Turton <ijtur...@gmail.com> wrote:
> When I try to use that MapServer as a WFS in the raw GeoTools code it
> gives me an exception:
>
> SEVERE: Failed to execute request http://ogc.geo-ide.
> developpement-durable.gouv.fr/wxs?REQUEST=DescribeFeatureType&MAP=/opt/
> data/carto/geoide-catalogue/1.4/org_38102/811a8b21-2526-
> 4eb9-bfaf-ffe61175a313.internet.map&VERSION=1.0.0&SERVICE=WFS
> Exception in thread "main" java.lang.NullPointerException: Content type
> is required for org.geotools.data.wfs.internal.DescribeFeatureTypeResponse
> at org.geotools.data.ows.Response.<init>(Response.java:49)
> at org.geotools.data.wfs.internal.WFSResponse.<init>(WFSResponse.java:66)
> at org.geotools.data.wfs.internal.DescribeFeatureTypeResponse.<init>(
> DescribeFeatureTypeResponse.java:45)
> at org.geotools.data.wfs.internal.parsers.DescribeFeatureTypeResponseFac
> tory.createResponse(DescribeFeatureTypeResponseFactory.java:62)
> at org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.
> java:220)
> at org.geotools.data.wfs.internal.WFSRequest.createResponse(WFSRequest.
> java:38)
> at org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(
> AbstractOpenWebService.java:445)
> at org.geotools.data.wfs.internal.WFSClient.internalIssueRequest(
> WFSClient.java:298)
> at org.geotools.data.wfs.internal.WFSClient.issueRequest(WFSClient.java:
> 360)
> at org.geotools.data.wfs.WFSDataStore.getRemoteFeatureType(
> WFSDataStore.java:210)
> at org.geotools.data.wfs.WFSDataStore.getRemoteSimpleFeatureType(
> WFSDataStore.java:264)
> at org.geotools.data.wfs.WFSFeatureSource.buildFeatureType(
> WFSFeatureSource.java:348)
> at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(
> ContentFeatureSource.java:356)
> at org.geotools.data.store.ContentFeatureSource.getSchema(
> ContentFeatureSource.java:325)
> at org.geotools.data.store.ContentFeatureCollection.<init>(
> ContentFeatureCollection.java:80)
> at org.geotools.data.store.ContentFeatureSource.getFeatures(
> ContentFeatureSource.java:583)
> at org.geotools.data.store.ContentFeatureSource.getFeatures(
> ContentFeatureSource.java:114)
> at com.ianturton.cookbook.input.FetchWFS.getData(FetchWFS.java:187)
> at com.ianturton.cookbook.input.FetchWFS.main(FetchWFS.java:67)
>
> But when I use curl to fetch that URL it says that the content-type
> is text/xml;charset=UTF-8 but that might be curl guessing
>
> So this might be a bug or an improvement we need
>
> Ian
>
> On 9 January 2018 at 12:05, alicemartin <alicemarti...@gmail.com> wrote:
>
>> Hello,
>>
>> I also tested the different versions of WFS (1.0.0, 1.1.0, 2.0.0) but the
>> layer cannot be displayed. On the other hand, a Getfeature request works
>> in
>> a web navigator. Isn't it odd?
>>
>> I don’t know WFS well, but I notice a warning message when you use the
>> URL
>> http://ogc.geo-ide.developpement-durable.gouv.fr/wxs?map=/
>> opt/data/carto/geoide-catalogue/1.4/org_38102/
>> 811a8b21-2526-4eb9-bfaf-ffe61175a313.internet.map&SERVICE=
>> WFS&VERSION=1.0.0&REQUEST=GetCapabilities&SRSNAME=epsg:4326
>> <http://ogc.geo-ide.developpement-durable.gouv.fr/wxs?map=/
>> opt/data/carto/geoide-catalogue/1.4/org_38102/
>> 811a8b21-2526-4eb9-bfaf-ffe61175a313.internet.map&SERVICE=
>> WFS&VERSION=1.0.0&REQUEST=GetCapabilities&SRSNAME=epsg:4326>
>> in a web navigator. On codeline 88, it’s written « WARNING: Required
>> Feature Id attribute (fid) not specified for this feature type. Make sure
>> you set one of wfs_featureid, ows_featureid or gml_featureid metadata. ».
>> Does anyone know if this error message is related to the impossibility to
>> display the layer in Geoserver ?
>>
>> Thank you in advance for your help,
>>
>> Alice
>>
>>
>>
>>
>> --
>> Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.
>> html
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to
>> this list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>>
>> If you want to request a feature or an improvement, also see this:
>> https://github.com/geoserver/geoserver/wiki/Successfully-req
>> uesting-and-integrating-new-features-and-improvements-in-GeoServer
>>
>>
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
>
> --
> Ian Turton
>
--
Ian Turton
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users