Dear list, I try to create a feature type with an sql-view through REST using FME(Safe Software). I use a POST-request to upload the following XML-body:
<?xml version="1.0" encoding="UTF-8"?> <featureType> <name>Layer_Name</name> <title>Layer_Title</title> <nativeName> DATABASE_TABLENAME</nativeName> <nativeCRS>$(NATIVE_RCS)</nativeCRS> <enabled>true</enabled> <metadata> <entry key="cachingEnabled">false</entry> <entry key="JDBC_VIRTUAL_TABLE"> <virtualTable> <name> Layer_Name </name> <sql> select * FROM schema.table where attribute1 IN (SELECT p1. attribute1 FROM schema.table p1, schema.table p2 WHERE p1. attribute1 = p2. attribute1 AND p1.attribute2 != p2. attribute2) </sql> <escapeSql>false</escapeSql> <geometry> <name>geom</name> <type>Point</type> <srid>4326</srid> </geometry> </virtualTable> </entry> </metadata> </featureType> As a result, the feature type is created and when I navigate to the SQL-view editor in the GUI, the SQL-statement is there. Nevertheless, even though it's there, it doesn't seem to work as when watching the layer preview I see all my geometries rather than the desired subset. If I create the feature type with the SQL-view manually using the same SQL-statement, it works perfectly. So I guess I have to add something to the REST-request? Additionally, there is a selection box in the GUI to suggest the geometry and SRID. Is it possible to call this option via a REST-request? Thank you in advance and kind regards i.A. Erik Böhm ------------------------------------------------------------------------------------------------------------------------- [BSH]<http://www.bsh.de/> Erik Böhm, M4209 Open Data Koordination Tel +49-40-3190-3429 (Neue Nummer ab 1.4.20) | erik.bo...@bsh.de<mailto:erik.bo...@bsh.de> Fax +49-40-3190-5000 Bernhard-Nocht-Straße 78, 20359 Hamburg Das Bundesamt für Seeschifffahrt und Hydrographie (BSH)<https://www.bsh.de/DE/Home/home_node.html> ist eine Bundesoberbehörde im Geschäftsbereich des Bundesministerium für Verkehr und digitale Infrastruktur<http://www.bmvi.de/>
_______________________________________________ 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 If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users