Skip to content

Updating a WMS cascading Layer via REST API causes 500 #695

@khercouet

Description

@khercouet

Context

I am working with GeoServer 2.27.2.0 (cloud) and the REST API.
I want to create a workspace, a WMS store, a WMS layer, and then update the WMS layer title.

Observed Behavior

Endpoint /workspaces/{workspace}/wmsstores/{store}/wmslayers/{layer}
returns 500 with exception (see attached exception file)

wmslayers rest doc
Endpoint /workspaces/{workspace}/wmslayers/{layer}
returns 200 OK but actual update happens, logs still show errors.

Test with different open source data :

Expected Behavior

Both endpoints should allow updating the WMS layer (e.g., title) without error

Steps to reproduce issue

  1. Create a workspace in GeoServer UI
  • Name: myworkspace
  • Namespace URI: myworkspace
  1. Create the WMS store
curl -i -X POST "http://localhost:9090/geoserver/cloud/rest/workspaces/myworkspace/wmsstores" \
  -u admin:geoserver \
  -H "Content-Type: application/json" \
  -d '{
    "wmsStore": {
      "name": "mystore",
      "capabilitiesURL": "https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0"
    }
  }'
  1. Create the WMS layer
curl -i -X POST "http://localhost:9090/geoserver/cloud/rest/workspaces/myworkspace/wmsstores/mystore/wmslayers/" \
  -u admin:geoserver \
  -H "Content-Type: application/json" \
  -d '{
    "wmsLayer": {
      "name": "mylayer",
      "nativeName": "ch.bakom.notruf-147_mobilnetz",
      "title": "mytitle"
    }
  }'
  1. Update the WMS layer (first endpoint)
curl -i -X PUT "http://localhost:9090/geoserver/cloud/rest/workspaces/myworkspace/wmsstores/mystore/wmslayers/mylayer" \
  -u admin:geoserver \
  -H "Content-Type: application/json" \
  -d '{
    "wmsLayer": {
      "title": "mynewtitle"
    }
  }'

see log log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions