Sounds like SLD 1.1 is not supported by GS 2.5.4, but I’m glad to hear you’ll soon switch to GS 2.8 
···
On Tue, Feb 2, 2016 at 5:15 PM, Sophie Mollard <sophie.mollard@anonymised.com> wrote:
Hi Stefano,
thank you for this prompt answer.
Indeed, I haven’t seen that I need to precise the prefix into the second cURL command with “application/vnd.ogc.se+xml”.
It doesn’t work with Geoserver 2.5.4. I have the error : Could not determine format. Try setting the Content-type header.400. The GS doc for the version 2.5 mentions “When executing a POST or PUT request with an SLD style, the Content-type
header should be set to application/vnd.ogc.sld+xml
.”
But It works fine with Geoserver 2.8, that I will soon use ! I just have to wait until then !
Thank you for you help !
Sophie MOLLARD
Pôle Géomatique
MSHE C. N. Ledoux (USR 3124)
Université de Franche-Comté
Tél : 03.81.66.51.55
Le 02/02/2016 14:29, Stefano Costa a écrit :
Hi Sophie,
I see your style is using SLD 1.1: did you set the proper Content-Type header in your POST / PUT request, namely application/vnd.ogc.se+xml , as per:
http://docs.geoserver.org/2.6.0/user/rest/api/styles.html#styles-format
(the link points to docs for GS 2.6.0, hope the content is relevant also for GS 2.5.4)
Hope this helps.
–
On Tue, Feb 2, 2016 at 11:05 AM, Sophie Mollard <sophie.mollard@anonymised.com> wrote:
Hi all,
I’m using Geoserver 2.5.4. I would like to create a new style into my Geoserver from a SLD file.
Thanks to this list, I succeed in publishing new style when my SLD doesn’t contain any prefixes like “se:”. But, when I saved my style into QGIS to create a SLD file, I always obtain a file with “se:” prefix.
My SLD file with prefixes is accepted into Geoserver and the symbols correct when I publish it via Internet interface :
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns=“http://www.opengis.net/sld” xmlns:ogc=“http://www.opengis.net/ogc” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” version=“1.1.0” xmlns:xlink=“http://www.w3.org/1999/xlink” units=“mm” xsi:schemaLocation=“http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd” xmlns:se=“http://www.opengis.net/se”>
se:Namecommunes_PNN</se:Name>
se:Namecommunes_PNN</se:Name>
se:FeatureTypeStyle
se:Rule
se:NameSingle symbol</se:Name>
se:PolygonSymbolizer
se:Fill
<se:SvgParameter name=“fill”>#74bb42</se:SvgParameter>
</se:Fill>
se:Stroke
<se:SvgParameter name=“stroke”>#000000</se:SvgParameter>
<se:SvgParameter name=“stroke-width”>0.26</se:SvgParameter>
<se:SvgParameter name=“stroke-linejoin”>bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
Nevertheless, if I publish the SLD file using cURL, my style isn’t correct : the characteristics between “se:” prefixes disappeared :
<?xml version="1.0" encoding="UTF-8"?>
sld:NamedLayer
sld:Namecommunes_PNN</sld:Name>
sld:UserStyle
sld:Namecommunes_PNN</sld:Name>
sld:FeatureTypeStyle
sld:Namename</sld:Name>
sld:Rule
sld:NameSingle symbol</sld:Name>
sld:PolygonSymbolizer
sld:Fill/
sld:Stroke/
</sld:PolygonSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
And yet, logs are ok and I don’t see any error.
Are there any solutions that allow Geoserver to publish SLD files with prefixes like “se:” when cURL is used ?
Best regards,
–
Sophie MOLLARD
Pôle Géomatique
MSHE C. N. Ledoux (USR 3124)
Université de Franche-Comté
Tél : 03.81.66.51.55
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Best regards,
Stefano Costa
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_it](http://twitter.com/geosolutions_it)
-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.
Best regards,
Stefano Costa
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_it](http://twitter.com/geosolutions_it)
-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.