Add external WFS to geoserver using REST API

المشرف العام

Administrator
طاقم الإدارة
I am trying to add an external WFS as a datasource to my geoserver via REST API. I already added a new workspace and WFS datasource.

Now I want to publish a layer from that WFS on geoserver. The same works for WMS, but seems to be a bit different and poorly documented for WFS services.

I tried to request

the following content as proposed in this post:

my_layer VECTOR point myFeature This doesn't work out for me, I get a 500: Cannot cast org.geoserver.catalog.impl.LayerInfoImpl to org.geoserver.catalog.DataStoreInfo.

Now I am not sure, if it is required to create a FeatureType for the layer in advance. I added the layer manually via geoserver UI where it automatically detects the feature type from the WFS layer. I would like the same behaviour via the REST API.

Can anyone lead me towards the correct approach?



أكثر...
 
أعلى