Sorry now i know my mistake.
Command above only create blank style, To upload sld file i gonna use PUT
method.


On Tue, Oct 22, 2013 at 11:45 AM, Макс Кливер <dh0m...@gmail.com> wrote:

> And in console i get:
>
> *D:\>curl.exe -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d
> "<style
>
> ><name>tester</name><filename>d:\tester.sld</filename></style>"
> http://localhost
> :8080/geoserver/rest/styles
> * Adding handle: conn: 0xa27878
> * Adding handle: send: 0
> * Adding handle: recv: 0
> * Curl_addHandleToPipeline: length: 1
> * - Conn 0 (0xa27878) send_pipe: 1, recv_pipe: 0
> * About to connect() to localhost port 8080 (#0)
> *   Trying ::1...
> * Connected to localhost (::1) port 8080 (#0)
> * Server auth using Basic with user 'admin'
> > POST /geoserver/rest/styles HTTP/1.1
> > Authorization: Basic YWRtaW46Z2Vvc2VydmVy
> > User-Agent: curl/7.32.0
> > Host: localhost:8080
> > Accept: */*
> > Content-type: text/xml
> > Content-Length: 68
> >
> * upload completely sent off: 68 out of 68 bytes
> < HTTP/1.1 201 Created
> < Date: Tue, 22 Oct 2013 05:37:35 GMT
> < Location: http://localhost:8080/geoserver/rest/styles/tester
> * Server Noelios-Restlet-Engine/1.0..8 is not blacklisted
> < Server: Noelios-Restlet-Engine/1.0..8
> < Transfer-Encoding: chunked
> <
> * Connection #0 to host localhost left intact
>
> D:\>*
>
>
> On Tue, Oct 22, 2013 at 11:43 AM, Макс Кливер <dh0m...@gmail.com> wrote:
>
>> Hi.
>>
>> I try to create style from sld file via rest. I do:
>>
>> * curl.exe -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d
>> "<style><name>tester</name><filename>d:\tester.sld</filename></style>"
>> http://localhost:8080/geoserver/rest/styles*
>>
>> And in Geoserver i see empty style and error inside:
>>
>> *Could not find SLD file "d:\tester.sld", please input a new SLD*
>>
>> If i use another path to sld file i d:/tester.sld i get same error.
>>
>> Whats wrong here?
>>
>
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to