geosolutions-it / ogc-testbed

Management repository for OGC testbed and other initiatives
0 stars 0 forks source link

Style API PUT and POST return 500 Error #72

Closed allyoucanmap closed 4 years ago

allyoucanmap commented 4 years ago

I'm using default credential admin/geoserver with basic authentication and trying to create or update a style and I get a 500 Server Error. I get same error in Swagger with POST new style.

Response:

{"code":"NoApplicableCode","description":""}

POST Request with Content-Type: application/vnd.ogc.sld+xml;version=1.0:

curl "http://localhost:8080/geoserver/ogc/styles/styles/" -H "Pragma: no-cache" -H "Sec-Fetch-Site: same-site" -H "Origin: http://localhost:8090" -H "Accept-Encoding: gzip, deflate, br" -H "Accept-Language: en-US,en;q=0.9" -H "Authorization: Basic YWRtaW46Z2Vvc2VydmVy" -H "Sec-Fetch-Mode: cors" -H "Content-Type: application/vnd.ogc.sld+xml;version=1.1" -H "Accept: application/json, text/plain, */*" -H "Cache-Control: no-cache" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" -H "Connection: keep-alive" -H "Referer: http://localhost:8090/" --data-binary ^"^<?xml version=^\^"1.0^\^" encoding=^\^"ISO-8859-1^\^"?^>^

^<StyledLayerDescriptor version=^\^"1.0.0^\^"^

        xsi:schemaLocation=^\^"http://www.opengis.net/sld StyledLayerDescriptor.xsd^\^"^

        xmlns=^\^"http://www.opengis.net/sld^\^"^

        xmlns:ogc=^\^"http://www.opengis.net/ogc^\^"^

        xmlns:xlink=^\^"http://www.w3.org/1999/xlink^\^"^

        xmlns:xsi=^\^"http://www.w3.org/2001/XMLSchema-instance^\^"^>^

^

    ^<NamedLayer^>^

        ^<Name^>Default Style^</Name^>^

        ^<UserStyle^>^

            ^<Title^>Title^</Title^>^

            ^<Abstract^>Abstract^</Abstract^>^

            ^<FeatureTypeStyle^>^

                ^<Rule^>^

                    ^<Name^>Rule Name^</Name^>^

                    ^<Title^>Rule Title^</Title^>^

                    ^<Abstract^>Rule Abstract^</Abstract^>^

                    ^<LineSymbolizer^>^

                        ^<Stroke^>^

                            ^<CssParameter name=^\^"stroke^\^"^>^#0000FF^</CssParameter^>^

                        ^</Stroke^>^

                        ^</LineSymbolizer^>^

                    ^<PointSymbolizer^>^

                        ^<Graphic^>^

                            ^<Mark^>^

                                ^<WellKnownName^>square^</WellKnownName^>^

                                ^<Fill^>^

                                    ^<CssParameter name=^\^"fill^\^"^>^#FF0000^</CssParameter^>^

                                ^</Fill^>^

                            ^</Mark^>^

                        ^</Graphic^>^

                    ^</PointSymbolizer^>^

                    ^</Rule^>^

                ^</FeatureTypeStyle^>^

            ^</UserStyle^>^

        ^</NamedLayer^>^

    ^</StyledLayerDescriptor^>^

^" --compressed
aaime commented 4 years ago

Is this one still valid?

aaime commented 4 years ago

Ping :D