Hey Luis,
some time has passed and I can't remember exactly, but a couple of
possible pointers for no-top-element:
- you'll need to declare all required xml namespaces in appschema/namespaces
- add them as ("secondary" I think they were called) workspaces in the
GS data dir aswell.
- and watch out for misspellings (e.g <prefix>qmd</prefix> vs
<prefix>gmd</prefix> :) )
If you'd like to take a look at a working example of inspire ps using
GeoServer appschema then there's
https://github.com/e-gov/kem-inspire/blob/reporting/src/data/ps/ProtectedSite/ProtectedSite.appschema
available with all the required (+ more) data dir contents aswell. The
service itself based on this app-schema can be reached through
https://gsavalik.envir.ee/geoserver/ps/ows?service=WFS&version=2.0.0&request=GetFeature&count=1&typename=ps:ProtectedSite
Hope this helps and all the best,
Tõnis
Kontakt ljacedo (<[email protected]>) kirjutas kuupäeval K, 5.
detsember 2018 kell 19:18:
>
> Hello,
>
> Please help:
>
> I´m trying to do the same think you have done, and Im getting the same
> error.
> I have check and dobule check my namespace to see if there is a problem and
> still I get the same error.
>
> Here is my namespace in ProtectedSite mapping file xml:
> <namespaces>
> <Namespace>
> <prefix>ps</prefix>
>
> <uri>"http://inspire.ec.europa.eu/schemas/ps/4.0"</uri>
> </Namespace>
> <Namespace>
> <prefix>base</prefix>
>
> <uri>"http://inspire.ec.europa.eu/schemas/base/3.3"</uri>
> </Namespace>
> <Namespace>
> <prefix>gn</prefix>
>
> <uri>"http://inspire.ec.europa.eu/schemas/gn/4.0"</uri>
> </Namespace>
> <Namespace>
> <prefix>qmd</prefix>
> <uri>"http://www.isotc211.org/2005/gmd"</uri>
> </Namespace>
> <Namespace>
> <prefix>gml</prefix>
> <uri>"http://www.opengis.net/gml/3.2"</uri>
> </Namespace>
> </namespaces>
>
> This is the FeatureTypeMapping in ProtectedSite Mapping file:
> <FeatureTypeMapping>
> <sourceDataStore>bd_oracle</sourceDataStore>
> <sourceType>PROTECTEDSITE</sourceType>
> <targetElement>ps:ProtectedSite</targetElement>
> <attributeMappings>
> <AttributeMapping>
>
> <targetAttribute>ps:legalFoundationDate</targetAttribute>
> <sourceExpression>
>
> <OCQL>LEGALFOUNDATIONDATE</OCQL>
> </sourceExpression>
> </AttributeMapping>
> </attributeMappings>
> </FeatureTypeMapping>
>
> Also, Here is the targetTypes (I don't think this could be a problem)
> <targetTypes>
> <FeatureType>
> <schemaUri>./ProtectedSites.xsd</schemaUri>
> </FeatureType>
> </targetTypes>
>
> The error log shows as follow:
> 2018-12-04 14:16:38,201 INFO [org.geoserver] - Loaded store 'ProtectedSite',
> enabled
> 2018-12-04 14:16:38,201 INFO [org.geoserver] - Loaded data store
> 'ProtectedSite'
> 2018-12-04 14:17:22,839 WARN [data.complex] - No top level element found in
> schemas: {"http://inspire.ec.europa.eu/schemas/ps/4.0"}ProtectedSite
> 2018-12-04 14:17:22,839 WARN [complex.config] - Error creating app-schema
> data store for 'ps:ProtectedSite', caused by: No top level element found in
> schemas: {"http://inspire.ec.europa.eu/schemas/ps/4.0"}ProtectedSite
> 2018-12-04 14:17:22,842 WARN [org.geoserver] - Error connecting to
> 'ProtectedSite'. Disabling.
> 2018-12-04 14:17:22,842 INFO [org.geoserver] -
> java.io.IOException: java.util.NoSuchElementException: No top level element
> found in schemas:
> {"http://inspire.ec.europa.eu/schemas/ps/4.0"}ProtectedSite
>
> If you could give some guiden on this matter I would appreciate
>
> Thanks
> Luis Acedo
_______________________________________________
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users