[mapserver-users] Mapscript C# and OWSRequest parameters

Seth G sethg at geographika.co.uk
Mon May 31 03:10:58 PDT 2021


Hi Jelmer,

There is no issue using MapServer to handle WFS POST requests, but it seems as though this functionality was never implemented for the MapScript bindings. 

See links:

https://github.com/MapServer/MapServer/issues/1788#issuecomment-42658553

> To implement this, we would need to actually implement the msIO_bufferRead()
> function in mapio.c, and add a function to push data into this buffer
> (something roughly like msIO_getStdoutBufferString() and
> msIO_getStdoutBufferBytes() from mapscript/swiginc/msio.i but in the
> opposite direction).
> 
And also https://github.com/MapServer/MapServer/issues/2681#issue-3960720

So two options - 1) add in the functionality for msIO_bufferRead (which would be a nice addition to MapServer), or 2) use the other MapScript querying mechanisms as documented at https://geographika.github.io/MapServer-documentation/mapscript/querying.html

Seth

--
web:http://geographika.co.uk
twitter: @geographika


On Mon, May 31, 2021, at 10:45 AM, Jelmer Baas wrote:
> Hi all,

>  

> Well, that route was a short one. Yes, I can call installStdinFromBuffer, but actually reading something via bufferRead:

>  

> int msIO_bufferRead( void *cbData, void *data, int byteCount )

>  

> {

>   (void)cbData;

>   (void)data;

>   (void)byteCount;

>   /* not implemented yet. */

>   return 0;

> }

>  

> 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?

>  

> Regards,

> Jelmer Baas

>  

> *From:* mapserver-users <mapserver-users-bounces at lists.osgeo.org> *On Behalf Of *Seth G
> *Sent:* donderdag 27 mei 2021 20:35
> *To:* mapserver-users at lists.osgeo.org
> *Subject:* Re: [mapserver-users] Mapscript C# and OWSRequest parameters

>  

> Hi Jelmer,

>  

> I think you'd have to use mapscript.msIO_installStdinFromBuffer to read data in.

> See https://mapserver.org/development/rfc/ms-rfc-16.html#io-hooking although I'm not sure if the approach works or was fully implemented.

> Let us know how you get on,

>  

> Seth

>  

> --

> web:http://geographika.co.uk

> twitter: @geographika

>  

>  

> On Thu, May 27, 2021, at 10:39 AM, Jelmer Baas wrote:

>> Hello,

>>  

>> 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.

>>  

>> 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.

>>  

>> Any suggestions on how to proceed?

>>  

>> Regards,

>> Jelmer Baas

>>                

>>  

>> _______________________________________________

>> mapserver-users mailing list

>> mapserver-users at lists.osgeo.org <mailto:mapserver-users%40lists.osgeo.org>

>> https://lists.osgeo.org/mailman/listinfo/mapserver-users

>>  

>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210531/d5b5e717/attachment-0001.html>


More information about the mapserver-users mailing list