Hi Ben, Thanks again - I have checked my workspace.xml and namespace.xml and have updated them to use the "town" prefix. I also realised that I needed a TownSurvey directory and a corresponding featuretype.xml underneath my data store directory in order for it to be picked up in the GetCapabilities document.
I then tried the following WFS request: http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&maxFeatures=2&typeName=town:TownSurvey Which gave me back the following response: <?xml version="1.0" encoding="UTF-8"?> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:tiger="http://www.census.gov" xmlns:cite="http://www.opengeospatial.net/cite" xmlns:nurc="http://www.nurc.nato.int" xmlns:sde="http://geoserver.sf.net" xmlns:topp="http://www.openplans.org/topp" xmlns:town="http://www.envitia.com/schemas/1.0" xmlns:it.geosolutions="http://www.geo-solutions.it" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="http://www.openplans.org/spearfish" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" numberOfFeatures="2" timeStamp="2013-06-10T11:10:31.990Z" xsi:schemaLocation="http://www.envitia.com/schemas/1.0 http://test3.test2.test1/MyGMLAS.xsd http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <gml:featureMember> <town:TownSurvey gml:id="townssurvey_poly.1"/> </gml:featureMember> <gml:featureMember> <town:TownSurvey gml:id="townssurvey_poly.2"/> </gml:featureMember> </wfs:FeatureCollection> This is progress, but I noticed that only the ID was being mapped - the town name was not being mapped. Referring back to extracts of my latest mapping file and my GML Application Schema, I have entries for "townName" as shown below. I have confirmed that TOWN is a character column in my PostGIS database, and I have tried various combinations of AttributeMappings that unfortunately haven't worked. If you have a spare moment, would you be able to advise me as to where I'm going wrong please? Many thanks for your support so far, it's much appreciated :-) Ryan = = = Mapping File (Attempt 1) = = = <AttributeMapping> <targetAttribute>town:townName</targetAttribute> <sourceExpression><OCQL>TOWN</OCQL></sourceExpression> </AttributeMapping> = = = Mapping File (Attempt 2) = = = <AttributeMapping> <targetAttribute>town:townName</targetAttribute> <sourceExpression>"test"</sourceExpression> </AttributeMapping> = = = Mapping File (Attempt 3) = = = <AttributeMapping> <targetAttribute>town:TownSurvey/townName</targetAttribute> <sourceExpression>"test"</sourceExpression> </AttributeMapping> = = = GML Application Schema = = = <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:town="http://www.envitia.com/schemas/1.0" targetNamespace="http://www.envitia.com/schemas/1.0" elementFormDefault="qualified"> <xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/> <xs:element name="TownSurvey" type="town:TownSurveyType" substitutionGroup="gml:AbstractFeature"/> <xs:complexType name="TownSurveyType"> <xs:complexContent> <xs:extension base="gml:AbstractFeatureType"> <xs:sequence> <xs:element name="townName" type="xs:string"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:schema> = = = -----Original Message----- From: Ben Caradoc-Davies [mailto:[email protected]] Sent: 10 June 2013 10:29 To: Ryan Moody Cc: [email protected]; Ian Turton; Neil Kirk Subject: Re: [Geoserver-users] App-Schema Publish Layer Exception Ryan, I think you have defined a namespace called "town_workspace", which is not what you want. Please check your workspace folder layout and your namespace.xml (and its namespace/prefix) and workspace.xml (and its workspace/name). Kind regards, Ben. On 10/06/13 17:23, Ryan Moody wrote: > We then tried a GetCapabilities request on the WFS - this returned a > valid capabilities document, but the only mention of "town" that it > contained was the workspace ( > xmlns:town_workspace="http://www.envitia.com/schemas/1.0" ) -- Ben Caradoc-Davies <[email protected]> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
