[QGIS-Developer] GeoFerver canno't read QGIS server WFS Services
Walter Lorenzetti
lorenzetti at gis3w.it
Mon Jun 5 00:26:31 PDT 2023
Hi René-Luc,
yes it fail on DescribeFeatureType.
This is the repsonse of QGIS 3.28.7:
<schema xmlns:gml="http://www.opengis.net/gml"
targetNamespace="http://www.qgis.org/gml"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0"
xmlns:qgs="http://www.qgis.org/gml"
xmlns:ogc="http://www.opengis.net/ogc" elementFormDefault="qualified">
<import
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"
namespace="http://www.opengis.net/gml"/>
<element name="buildings" substitutionGroup="gml:_Feature"
type="qgs:buildingsType"/>
<complexType name="buildingsType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element maxOccurs="1" name="geometry" minOccurs="0"
type="gml:MultiSurfacePropertyType"/>
<element name="fid" alias="ID" type="long"/>
<element name="name" alias="Name" type="string"/>
<element name="address" alias="Address" type="string"
nillable="true"/>
<element name="year" alias="Year of construction" type="long"/>
<element name="photo" alias="Photo" type="string" nillable="true"/>
<element name="link" alias="Link" type="string" nillable="true"/>
<element name="form" alias="Form" type="string" nillable="true"/>
<element name="high" alias="High" type="long"/>
<element name="volume" alias="Volume" type="long" nillable="true"/>
<element name="surface" alias="Surface (based on QGIS expression)"
type="decimal" nillable="true"/>
<element name="architectural_barriers" alias="Architectural
barriers" type="string" nillable="true"/>
<element name="date_barriers" alias="Date" type="date"
nillable="true"/>
<element name="safety_exits" alias="Safety exits" type="string"
nillable="true"/>
<element name="date_exits" alias="Date" type="date" nillable="true"/>
<element name="fire_system" alias="Fire system" type="string"
nillable="true"/>
<element name="date_fire" alias="Date" type="date" nillable="true"/>
<element name="type" alias="Type" type="string"/>
<element name="zone" alias="Zone (based on QGIS expression)"
type="string" nillable="true"/>
<element name="attachment" alias="Documents to be attached"
type="long" nillable="true"/>
<element name="subtype" alias="Subtype - Dependent on the value of
Type" type="string" nillable="true"/>
<element name="user" alias="User last modification" type="string"
nillable="true"/>
<element name="description" alias="Description" type="string"
nillable="true"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
and following a DescribeFeatureType response which does not fail on
geoservers from a Italy government service:
http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Alluvioni_Estensione.map&TYPENAME=ITH2018_Estensione_LPH&REQUEST=DescribeFeatureType&VERSION=1.1.0&SERVICE=WFS
<?xml version='1.0' encoding="ISO-8859-1" ?>
<schema
targetNamespace="http://mapserver.gis.umn.edu/mapserver"
xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:gml="http://www.opengis.net/gml"
elementFormDefault="qualified" version="0.1" >
<import namespace="http://www.opengis.net/gml"
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" />
<element name="ITH2018_Estensione_LPH"
type="ms:ITH2018_Estensione_LPHType"
substitutionGroup="gml:_Feature" />
<complexType name="ITH2018_Estensione_LPHType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element name="boundary" type="gml:SurfacePropertyType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="id" type="string"/>
<element name="rbdname" type="string"/>
<element name="uomcode" type="string"/>
<element name="apsfrcode" type="string"/>
<element name="category" type="string"/>
<element name="eu_cd_hp" type="string"/>
<element name="source" type="string"/>
<element name="character" type="string"/>
<element name="mechanism" type="string"/>
<element name="frequency" type="string"/>
<element name="namespace" type="string"/>
<element name="beginlife" type="string"/>
<element name="detmetod" type="string"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
I can't see a substantial difference :(
W
Il 31/05/23 15:28, René-Luc Dhont via QGIS-Developer ha scritto:
> Hi Walter,
>
> You have to check the result of DescribeFeatureType WFS Request.
> This request has to provide the XSD to validate the GML.
>
> Regards,
> René-Luc
>
> Le 31/05/2023 à 14:59, Walter Lorenzetti via QGIS-Developer a écrit :
>>
>> Hi,
>>
>> when I try to add a WFS service layer to a GeoServer instance I get
>> an exception like this:
>>
>> ```
>>
>> ...
>>
>> Caused by: java.lang.RuntimeException:
>> org.geotools.data.DataSourceException: No XSDElementDeclaration found
>> for {http://www.opengis.net/wfs}Particelle_terreni_e_fabbricati
>> at
>> org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:329)
>> at
>> org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:296)
>> at
>> org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:105)
>> at
>> org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:342)
>> at
>> org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:325)
>> at
>> org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:409)
>>
>> ...
>>
>> ```
>>
>> Any idea about this issue? It seams a XML error validation..
>>
>> Thanks in advance.
>>
>> W
>>
>>
>> --
>>
>> Walter Lorenzetti phD
>> email: lorenzetti at gis3w.it
>> site: gis3w.it <https://gis3w.it>
>> twitter: w_lorenzetti
>> Tel/Cell: (+39) 347-6597931
>> Viale Verdi 24 - 51016 Montecatini Terme (PT)
>>
>>
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Walter Lorenzetti phD
email: lorenzetti at gis3w.it
site: gis3w.it <https://gis3w.it>
twitter: w_lorenzetti
Tel/Cell: (+39) 347-6597931
Viale Verdi 24 - 51016 Montecatini Terme (PT)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20230605/e2924339/attachment.htm>
More information about the QGIS-Developer
mailing list