Lange,

did you remove the old app-schema-cache/localhost/ct/service.xsd to force an update? app-schema will cache schemas indefinitely and not check for an update.

Kind regards,
Ben.

On 26/09/17 00:19, Lange wrote:
Hi, thanks for reply ...
i changed schema:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema
     targetNamespace="http://geoserver.org/ct";
     xmlns:ct="http://geoserver.org/ct";
     xmlns:xs="http://www.w3.org/2001/XMLSchema";
     xmlns:gml="http://www.opengis.net/gml";
     attributeFormDefault="unqualified"
     elementFormDefault="qualified"
     version="1.0">
    <xs:import namespace="http://www.opengis.net/gml"; schemaLocation=
"http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"; />
     <xs:element name="service" type="ct:ServiceType" substitutionGroup="gml:
_Feature" />
     <xs:complexType name="ServiceType">
         <xs:complexContent>
             <xs:extension base="gml:AbstractFeatureType">
                 <xs:sequence>
                     <xs:element name="Id" type="xs:string" />
                     <xs:element name="Code" type="xs:string" />
                 </xs:sequence>
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
</xs:schema>

and also mapping:
...
<typeMappings>
         <FeatureTypeMapping>
             <sourceDataStore>datastore</sourceDataStore>
             <sourceType>service_v</sourceType>
             <targetElement>ct:service</targetElement>
             <attributeMappings>
                 <AttributeMapping>
                     <targetAttribute>Id</targetAttribute>
                     <sourceExpression>
                         <OCQL>id</OCQL>
                     </sourceExpression>
                      <encodeIfEmpty>true</encodeIfEmpty>
                 </AttributeMapping>
                 <AttributeMapping>
                     <targetAttribute>Code</targetAttribute>
                     <sourceExpression>
                         <OCQL>code</OCQL>
                     </sourceExpression>
                      <encodeIfEmpty>true</encodeIfEmpty>
                 </AttributeMapping>
             </attributeMappings>
         </FeatureTypeMapping>
     </typeMappings>

where service_v is db view:
create view service_v as
select id::text, code from service;


But result is the same:

There was an error trying to connect to store ct_service. Do you want to
save it anyway?


Original exception error:

java.util.NoSuchElementException: No top level element found in schemas:
{http://www.geoserver.org/ct}service



Thanks for any other idea,


--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
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

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to