I would like to register a new SQL view layer to GeoServer through the REST API, I am using geoserver-manager.
The registration is OK, the layer is working fine, except the WMS GetFeatureInfo, which returns:
"Operation on mixed SRID geometries".
If I manually set the SQL view's geometry column's SRID in the GeoServer administration page, it works fine.
But I cannot find any way to set it in the XML request. I'm sending the geometry info:
<geometry> <name>geom</name> type>Point</type <srid>4326</srid> </geometry>
And the geometry attribute:
<attribute> <name>geom</name> <minOccurs>0</minOccurs> <maxOccurs>1</maxOccurs> <nillable>true</nillable> <binding>com.vividsolutions.jts.geom.Point</binding> </attribute>
But I cannot set the attributes SRID and the geometry info is not enough. The geometry attribute will be registered as SRID -1.
Is there an API call to refresh the layer fields?