<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11pt;font-family:"Calibri", sans-serif;}
#qt a:link{color:blue;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt p.qt-qt-msonormal1{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11pt;font-family:"Calibri", sans-serif;}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><div>Actually as there are no URL limits with MapScript you should be able to add your filter as a WFS GET parameter and skip using POST requests altogether. <br></div><div><br></div><div><a href="https://www.mapserver.org/fr/ogc/filter_encoding.html#tests">https://www.mapserver.org/fr/ogc/filter_encoding.html#tests</a><br></div><div><br></div></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:http://geographika.co.uk<br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div><br></div><div>On Mon, May 31, 2021, at 10:45 AM, Jelmer Baas wrote:<br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><p class="qt-MsoNormal"><span style="" lang="EN-US">Hi all,</span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"> </span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US">Well, that route was a short one. Yes, I can call installStdinFromBuffer, but actually reading something via bufferRead:</span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"> </span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";">int msIO_bufferRead( void *cbData, void *data, int byteCount )</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";"> </span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";">{</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";"> (void)cbData;</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";"> (void)data;</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";"> (void)byteCount;</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";"> /* not implemented yet. */</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";"> return 0;</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"><span class="font" style="font-family:"Courier New";">}</span></span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"> </span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US">Unless I’m missing something, this isn’t possible, yet. I find it hard to believe no-one uses MapServer to handle WFS Post requests, so I’m pretty sure I’m missing something?</span><br></p><p class="qt-MsoNormal"><span style="" lang="EN-US"> </span><br></p><div><p class="qt-MsoNormal">Regards,<br></p><p class="qt-MsoNormal">Jelmer Baas<br></p></div><p class="qt-MsoNormal"><span style=""> </span><br></p><div><div style="border-right-color:currentcolor;border-right-style:none;border-right-width:medium;border-bottom-color:currentcolor;border-bottom-style:none;border-bottom-width:medium;border-left-color:currentcolor;border-left-style:none;border-left-width:medium;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-color:rgb(225, 225, 225);border-top-style:solid;border-top-width:1pt;padding-top:3pt;padding-right:0cm;padding-bottom:0cm;padding-left:0cm;"><p class="qt-MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> mapserver-users <mapserver-users-bounces@lists.osgeo.org> <b>On Behalf Of </b>Seth G<br> <b>Sent:</b> donderdag 27 mei 2021 20:35<br> <b>To:</b> mapserver-users@lists.osgeo.org<br> <b>Subject:</b> Re: [mapserver-users] Mapscript C# and OWSRequest parameters</span></p></div></div><p class="qt-MsoNormal"> <br></p><div><p class="qt-MsoNormal">Hi <span lang="EN-US">Jelmer,</span><br></p></div><div><p class="qt-MsoNormal"> <br></p></div><div><p class="qt-MsoNormal"><span lang="EN-US">I think you'd have to use mapscript.</span>msIO_installStdinFromBuffer to read data in.<br></p></div><div><p class="qt-MsoNormal">See <a href="https://mapserver.org/development/rfc/ms-rfc-16.html#io-hooking"> https://mapserver.org/development/rfc/ms-rfc-16.html#io-hooking</a> although I'm not sure if the approach works or was fully implemented.<br></p></div><div><p class="qt-MsoNormal">Let us know how you get on,<br></p></div><div><p class="qt-MsoNormal"> <br></p></div><div><p class="qt-MsoNormal">Seth<br></p></div><div><p class="qt-MsoNormal"> <br></p></div><div id="qt-sig62266145"><div><p class="qt-MsoNormal">--<br></p></div><div><p class="qt-MsoNormal">web:http://geographika.co.uk<br></p></div><div><p class="qt-MsoNormal">twitter: @geographika<br></p></div></div><div><p class="qt-MsoNormal"> <br></p></div><div><p class="qt-MsoNormal"> <br></p></div><div><p class="qt-MsoNormal">On Thu, May 27, 2021, at 10:39 AM, Jelmer Baas wrote:<br></p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;overflow-wrap:break-word;" id="qt-qt"><div><p class="qt-qt-msonormal1"><span lang="EN-US">Hello,</span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US"> </span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US">For a new project, I’ve decided to pickup MapScript again to function as an internal (back-end) WFS server. I use the OWSRequest class, which works fine when I fill it with loadParamsFromURL() – in the case of Get
requests.</span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US"> </span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US">I can’t seem to figure out a way to get my POST data into this object, though. It has a loadParams method, but because I’m not running as a CGI application (back-end app without a webserver), this doesn’t do anything.
I also tried setting postrequest property and then calling the loadParams, setting Environment variables, etc. No error, no exception, just -1 value from NumParams.</span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US"> </span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US">Any suggestions on how to proceed?</span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US"> </span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US">Regards,</span><br></p><p class="qt-qt-msonormal1"><span lang="EN-US">Jelmer Baas</span><br></p><p class="qt-qt-msonormal1"> <br></p><p class="qt-qt-msonormal1"> <br></p></div><div><p class="qt-MsoNormal">_______________________________________________<br></p></div><div><p class="qt-MsoNormal">mapserver-users mailing list<br></p></div><div><p class="qt-MsoNormal"><a href="mailto:mapserver-users%40lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br></p></div><div><p class="qt-MsoNormal"><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></p></div><div><p class="qt-MsoNormal"> <br></p></div></blockquote><div><p class="qt-MsoNormal"> <br></p></div></div></blockquote><div><br></div></body></html>