Robin Chahal ( https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3A32df572e-7afb-4a59-9748-917a2b237c46 ) *created* an issue
GeoServer ( https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYzU4OTFlZDZhMzYwNGYwNjgzYjBlZTM2NDkyNzNmOGEiLCJwIjoiaiJ9 ) / Bug ( https://osgeo-org.atlassian.net/browse/GEOS-10771?atlOrigin=eyJpIjoiYzU4OTFlZDZhMzYwNGYwNjgzYjBlZTM2NDkyNzNmOGEiLCJwIjoiaiJ9 ) GEOS-10771 ( https://osgeo-org.atlassian.net/browse/GEOS-10771?atlOrigin=eyJpIjoiYzU4OTFlZDZhMzYwNGYwNjgzYjBlZTM2NDkyNzNmOGEiLCJwIjoiaiJ9 ) Problem with POST /rest/layers/{layer}/styles endpoint ( https://osgeo-org.atlassian.net/browse/GEOS-10771?atlOrigin=eyJpIjoiYzU4OTFlZDZhMzYwNGYwNjgzYjBlZTM2NDkyNzNmOGEiLCJwIjoiaiJ9 ) Issue Type: Bug Affects Versions: 2.19.0 Assignee: Unassigned Components: REST Created: 06/Dec/22 8:40 PM Priority: Medium Reporter: Robin Chahal ( https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3A32df572e-7afb-4a59-9748-917a2b237c46 ) If I look at the Swagger page for the POST /rest/layers/ {layer} /styles endpoint it suggests a styleBody in the format: <?xml version="1.0" encoding="UTF-8"?> <StyleInfoPost> <name>roads_style</name> <filename>roads.sld</filename> </StyleInfoPost> If I send a styleBody in that format I get an HTTP 500 error: StyleInfoPost com.thoughtworks.xstream.mapper.CannotResolveClassException: StyleInfoPost The endpoint works if I send a styleBody in application/json format similar to: { style: { name: "styleName" } } Note: The same issue came up in StackExchange here: https://gis.stackexchange.com/questions/375360/unable-to-associate-style-with-layer ( https://gis.stackexchange.com/questions/375360/unable-to-associate-style-with-layer ) ( https://osgeo-org.atlassian.net/browse/GEOS-10771#add-comment?atlOrigin=eyJpIjoiYzU4OTFlZDZhMzYwNGYwNjgzYjBlZTM2NDkyNzNmOGEiLCJwIjoiaiJ9 ) Add Comment ( https://osgeo-org.atlassian.net/browse/GEOS-10771#add-comment?atlOrigin=eyJpIjoiYzU4OTFlZDZhMzYwNGYwNjgzYjBlZTM2NDkyNzNmOGEiLCJwIjoiaiJ9 ) Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100211- sha1:7eca2fb )
_______________________________________________ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel