Sam, what are the XSD types of Shape and AdministrativeAreas in the schema? What is the XSD type of Facility? Complex properties must follow the GML encoding rule, in which each object is contained in a property type so that both its name and type information can be encoded. Not following this pattern can cause objects to be ignored by the encoder.
An example of this pattern is GML GeometryPropertyType. If your Shape property had type GeometryPropertyType, then your encoded output would be something like Shape/Geometry. I would expect that you would also need an AdministrativeAreasPropertyType. From the example you give, I think you are using type names where you should be using property names. I expected something more like shape/Geometry and administrativeareas/AdministrativeAreas. The property name element looks like it is missing. See section 7.1.1 on page 20-21 (PDF page 30-31) of the GML 3.2.1 standard (OGC 07-036): http://portal.opengeospatial.org/files/?artifact_id=20509 The rule is the same for GML 3.1.1. Kind regards, Ben. On 26/02/17 21:59, sammeek wrote: > Hi Ben, > > Thanks for the response. As you can probably gather, I'm a bit new at this. > > OK, so I've changed the namespace in the XSDs and referred to them in the > mapping files and created an extra workspace for the GML 3.2 requirements. > The files load into Geoserver OK. > > However, when I try and create GML 3.2 via a WFS query, I get the following: > > <wfs:member> > <aasg1:Facility id="facility.1"> > <aasg1:FacilityName>Edinburgh Castle</aasg1:FacilityName> > <aasg1:FacilityOperatingStatus>Open</aasg1:FacilityOperatingStatus> > <aasg1:VerticalConstructionMaterial>Stone</aasg1:VerticalConstructionMaterial> > <aasg1:TerrainConstructionMaterial>Stone</aasg1:TerrainConstructionMaterial> > <aasg1:StatisticalGeographicArea>Text</aasg1:StatisticalGeographicArea> > <aasg1:GeopoliticalEntity>text2</aasg1:GeopoliticalEntity> > <aasg1:FacilityID>1</aasg1:FacilityID> > <aasg1:AdministrativeDivision>1</aasg1:AdministrativeDivision> > <aasg1:longitude>3.1987</aasg1:longitude> > <aasg1:latitude>55.9486</aasg1:latitude> > <aasg1:AdministrativeAreas/> > <aasg1:Shape/> > </aasg1:Facility> > </wfs:member> > <wfs:member> > > As you can see the aasg1:Shape is not populated and neither is the > AdministrativeAreas (this is the complex field if you like that is of type > AdministrativeAreas and references another mapping file. > > The mapping file fragments are as follows: > > To create Administrative areas: > > <typeMappings> > <FeatureTypeMapping> > <sourceDataStore>tcStore</sourceDataStore> > <sourceType>administrativeareas</sourceType> > <targetElement>aasg2:AdministrativeAreas</targetElement> > <attributeMappings> > <AttributeMapping> > <targetAttribute>aasg2:IDR</targetAttribute> > <sourceExpression> > <OCQL>id</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg2:NameOfArea</targetAttribute> > <sourceExpression> > <OCQL>nameofarea</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg2:lat</targetAttribute> > <sourceExpression> > <OCQL>lat</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg2:long</targetAttribute> > <sourceExpression> > <OCQL>long</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg2:Shape</targetAttribute> > <idExpression> > <OCQL>id</OCQL> > </idExpression> > <sourceExpression> > <OCQL>shape</OCQL> > </sourceExpression> > </AttributeMapping> > </attributeMappings> > </FeatureTypeMapping> > </typeMappings> > > To create Facility: > > <typeMappings> > <FeatureTypeMapping> > <sourceDataStore>SeismicEventStore</sourceDataStore> > <sourceType>facility</sourceType> > <targetElement>aasg1:Facility</targetElement> > <attributeMappings> > <AttributeMapping> > <targetAttribute>aasg1:Shape</targetAttribute> > <idExpression> > <OCQL>facilityid</OCQL> > </idExpression> > <sourceExpression> > <OCQL>facilitylocation</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg1:FacilityName</targetAttribute> > <sourceExpression> > <OCQL>facilityname</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > > <targetAttribute>aasg1:FacilityOperatingStatus</targetAttribute> > <sourceExpression> > <OCQL>facilityoperatingstatus</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > > <targetAttribute>aasg1:VerticalConstructionMaterial</targetAttribute> > <sourceExpression> > <OCQL>verticalconstructionmaterial</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > > <targetAttribute>aasg1:TerrainConstructionMaterial</targetAttribute> > <sourceExpression> > <OCQL>terrainconstructionmaterial</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > > <targetAttribute>aasg1:StatisticalGeographicArea</targetAttribute> > <sourceExpression> > <OCQL>statisticalgeographicarea</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg1:GeopoliticalEntity</targetAttribute> > <sourceExpression> > <OCQL>geopoliticalentity</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg1:FacilityID</targetAttribute> > <sourceExpression> > <OCQL>facilityid</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > > <targetAttribute>aasg1:AdministrativeDivision</targetAttribute> > <sourceExpression> > <OCQL>administrativedivision</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg1:longitude</targetAttribute> > <sourceExpression> > <OCQL>longitude</OCQL> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg1:AdministrativeAreas</targetAttribute> > <sourceExpression> > <OCQL>administrativedivision</OCQL> > > <linkElement>aasg3:AdministrativeAreas</linkElement> > <linkField>aasg3:IDR</linkField> > </sourceExpression> > </AttributeMapping> > <AttributeMapping> > <targetAttribute>aasg1:latitude</targetAttribute> > <sourceExpression> > <OCQL>latitude</OCQL> > </sourceExpression> > </AttributeMapping> > </attributeMappings> > </typeMappings> > > > I'm not sure what else to check. Any help is gratefully appreciated! > > Sam > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/Complex-GML-3-1-1-from-App-Schema-tp5309269p5309530.html > Sent from the GeoServer - User mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Ben Caradoc-Davies <[email protected]> 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 [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
