I have an Mapserver 7.0.4 for WMS GetMap requests currently over GET. Is it possible to send POST GetMap requests to the mapserver? I already searched some other topics and the documentation, it seems that WFS supports POST but i have no information about WMS.
I already tried to send some POST requests but all i got back was the template i specified and not the actual image i expected. (Capabilities says POST is enabled)
But it seems that the Mapserver is indeed processing the POST Body: In the POST Body i used a modified XML file i found online, if the xml file contains mistakes it gives out an error. So something is definitely going on there.
GET: example URL (which works fine)
http://exampleurl.com/cgi-bin/mapserv?MAP=/etc/mapserver/example.map&LAYERS=Example&SRS=EPSG:4326&VISIBILITY=true&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image/png&BBOX=7,49,8,50&WIDTH=256&HEIGHT=256
POST: XML (Which does not work)
<?xml version="1.0" encoding="utf-8"?>
<ogc:GetMap gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ows"
xmlns:gml="http://www.opengis.net/gml" version="1.3.0" service="WMS">
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>Example</Name>
</NamedLayer>
</StyledLayerDescriptor>
<SRS>EPSG:4326</SRS>
<BoundingBox srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>7</gml:X>
<gml:Y>49</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>8</gml:X>
<gml:Y>50</gml:Y>
</gml:coord>
</BoundingBox>
<Output>
<Size>
<Width>256</Width>
<Height>256</Height>
</Size>
<Format>image/png</Format>
<Transparent>TRUE</Transparent>
</Output>
<Exceptions>application/vnd.ogc.se+xml</Exceptions>
</ogc:GetMap>
If WMS works with POST, has anyone more information about the structure of these XML files and how to build them properly? The Mapserver documention contains only:
The ability for MapServer to be able to receive Post requests with XML-encoded information sent in the body of the request has been added. Also, the ability to generate XML-encoded Post requests for WFS layers has been added.