<div dir="ltr">This might help:<div>   <a href="https://gis.stackexchange.com/questions/232215/mapserver-wms-http-post-requests">https://gis.stackexchange.com/questions/232215/mapserver-wms-http-post-requests</a><div>As mentioned in one of the answers I was able to do a GetMap request via POST using key=value. I did not try with XML.</div><div><br></div><div>Rich</div><div><br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 5:44 AM, Sushrut Shivaswamy <span dir="ltr"><<a href="mailto:sushrut.shivaswamy@gmail.com" target="_blank">sushrut.shivaswamy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey,<div><br></div><div>I have a requirement to style a vector layer without polluting the layer definition</div><div>in the map file with classobjects and such.</div><div>The method I have adopted is to use the SLD_Body parameter of a WMS GetMap request</div><div>to receive the styled images.</div><div>This has worked so far but now the size of the SLD has grown so much that exceeds the maximum number of characters permitted in a url.</div><div>So I can no longer send my SLD as a part of the GET request.</div><div>My SLD request till now was as follows</div><div><br></div><div><b><a href="http://localhost:8000/" target="_blank">http://localhost:8000/</a><span style="background-color:rgb(250,250,250);color:rgb(80,80,80);font-family:opensans,helvetica,arial,sans-serif;font-size:12px;white-space:pre-wrap">cgi-bin/<wbr>mapserv?service=wms&request=<wbr>GetMap&version=1.0.0&layers=<wbr>namespace:layer&sld_body=sld_<wbr>as_string..</span></b></div><div><span style="background-color:rgb(250,250,250);color:rgb(80,80,80);font-family:opensans,helvetica,arial,sans-serif;font-size:12px;white-space:pre-wrap"><br></span></div><div><span style="background-color:rgb(250,250,250);color:rgb(80,80,80);font-family:opensans,helvetica,arial,sans-serif;font-size:12px;white-space:pre-wrap"><br></span></div>To overcome this problem I believe POST rquests are a good solution since the SLD can then be sent as a part of the request body.<div><span style="background-color:rgb(250,250,250);color:rgb(80,80,80);font-family:opensans,helvetica,arial,sans-serif;font-size:12px;white-space:pre-wrap"><br></span></div><div>However, I am unable to execute a POST GetMap request.</div><div><br></div><div>The request body is as follows.</div><div><br></div><?xml version="1.0" encoding="UTF-8"?><br><ogc:GetMap xmlns:ogc="<a href="http://www.opengis.net/ows" target="_blank">http://www.opengis.<wbr>net/ows</a>"<br>            xmlns:gml="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.<wbr>net/gml</a>"<br>   version="1.3.0" service="WMS"><br>   <StyledLayerDescriptor version="1.0.0"><br>      <NamedLayer><br>        <Name>world</Name><br>      </NamedLayer><br>   </StyledLayerDescriptor><br>   <BoundingBox srsName="<a href="http://www.opengis.net/gml/srs/epsg.xml#4326" target="_blank">http://www.opengis.<wbr>net/gml/srs/epsg.xml#4326</a>"><br>      <gml:coord><gml:X>-130</gml:X><wbr><gml:Y>24</gml:Y></gml:coord><br>      <gml:coord><gml:X>-55</gml:X><<wbr>gml:Y>50</gml:Y></gml:coord><br>   </BoundingBox><br>   <Output><br>      <Format>image/png</Format><br>      <Size><br>      <Width>64</Width><br>      <Height>64</Height><br>   </Size><br>   </Output><br></ogc:GetMap><div><br></div><div><br></div><div>On sending this POST request to mapserver I get the error</div><div><span style="color:rgb(0,0,0);font-family:"times new roman";font-size:medium"><b>msCalculateScale(): General error message. Invalid image width or height.</b></span><br></div><div><br></div><div>Even though the width and height has been specified in the XML.</div><div>The above XML works with Geoserver.</div><div>Does Mapserver support POST GetMap requests?</div><div><br></div><div>Regards,</div><div>Sushrut Shivaswamy</div></div>
<br>______________________________<wbr>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.<wbr>org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapserver-<wbr>users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Richard W. Greenwood, PLS<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>
</div>