Hello,
I have a problem with mapping target attribute to complex data type
(geoserver 2.3 with app-schema).
The data source is PostgreSQL. Target attribute with name “purpose” has type
datatype2. Datatype2 is a separate table containing 3 fields with types
varchar, integer, integer.
The request: http://localhost:8080/geoserver/wfs?
request=GetFeature&version=1.1.0&typeName=test:DataType2
works fine.
When I try to map target attribute to complex type (substitutionGroup is
gml:AbstractType) the following error appears:
java.lang.RuntimeException: Error applying mapping with targetAttribute
test:purpose Error applying mapping with targetAttribute test:purpose Could
not find working property accessor for attribute (purpose) in object…
The fragment of mapping file is the following:
…
<AttributeMapping>
<targetAttribute>test:purpose</targetAttribute>
<targetAttributeNode>test:DataType2Type</targetAttributeNode>
<sourceExpression>
<OCQL>purpose</OCQL>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
…
The XSD fragment is the following:
<element name="DataType2" substitutionGroup="gml:AbstractObject"
type="test:DataType2Type"/>
<complexType name="DataType2Type">
<sequence>
<element maxOccurs="unbounded" name="string" type="string"/>
<element minOccurs="0" name="intfield" type="integer"/>
</sequence>
</complexType>
…
<element name="LandImmovable" substitutionGroup="gml:AbstractFeature"
type="test:LandImmovableType">
<complexType name="LandImmovableType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element name="identifier" type="string"/>
<element name="geometry" type="gml:SurfacePropertyType" nillable
= "true"/>
<element name="purpose" type="test:DataType2PropertyType"/>
<element name="doublefield" type="gml:AreaType"/>
…
…
</sequence>
What is wrong?
Regards