[mapserver-users] Get Map Request with SLD Parameter and local SLD file not via http

Fabian Patzke 2 listensammler at patzi.de
Thu Jul 28 08:26:37 EDT 2011


Hi List,
I tried to make a getMap request and send mapserver (6.0.1) a url (http) to
the SLD. This works as expected mapserver fetches the SLD and print the map
as defined in the SLD. The SLD is fetched from an application running in
tomcat 6.x. The Problem is that every getMap request creates a new session
and so I have a huge number of sessions just from every mapserver request.

So I tried to make send the SLD as a path to a local file mapserver can
reach, just like the mapfile itself. So the SLD parameter looks like this
SLD=file:///home/user/tomcat6/temp/sld_4997.xml the hole request:
http://localhost/cgi-bin/mapserv?map=/home/user/tomcat6/temp/web.map&LAYERS=flk&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SLD=file:///home/user/tomcat6/temp/sld_4997.xml&SRS=EPSG%3A25832&BBOX=572178.49459,5700398.1267994,577747.883339,5704136.2447176&WIDTH=958&HEIGHT=643
With this mapserver is not returning any map image but an error. In the log
file it says:

[Thu Jul 28 14:12:15 2011] [error] [client 127.0.0.1] CGI Request 1 on
process 8224
[Thu Jul 28 14:12:15 2011] [error] [client 127.0.0.1]
msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl
error code 0 () for file:///home/user/tomcat6/temp/sld_4997.xml
[Thu Jul 28 14:12:15 2011] [error] [client 127.0.0.1] msSLDApplySLDURL: WMS
server error. Could not open SLD file:///home/user/tomcat6/temp/sld_4997.xml
and save it in temporary file
/home/user/tomcat6/temp/4e31521f_2020_0.sld.xml. Please make sure that the
sld url is valid and that the temporary path is set. The temporary path can
be defined for example by setting TMPPATH in the map file. Please check the
MapServer documentation on temporary path settings.
[Thu Jul 28 14:12:15 2011] [error] [client 127.0.0.1] msFreeMap(): freeing
map at 0x8262178.

"curl error code 0" means as far as I know everything is OK. Also the file
mapserver is complaining about that it can not be written
(home/user/tomcat6/temp/4e31521f_2020_0.sld.xml) is created and has the same
content as the original SLD file. So mapserver can read the SLD and write
its temp one. But somewhere it stops with creating the map image.

I hope someone can understand my problem and maybe give me some hint.

Thanks in advance.

Greetings,
Fabian


PS: The error says one has to take care of "setting TMPPATH" but this must
be "TEMPPATH", mustn't it?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Get-Map-Request-with-SLD-Parameter-and-local-SLD-file-not-via-http-tp6629653p6629653.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list