WFS Problems

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Wed Dec 1 11:26:37 EST 2004


One other thing you can try is to force mapserver to send Get request to
the wfs server by adding the following metadata on your layer (default
is Post) :
    "wfs_request_method" "GET".

  You should also test the wfs_server by manulally sending some requests
to make sure that that the wfs responsd properly. Does the
http://babyz.uni-muenster.de/wfs/WFS?SERVICE=WFS&VERSION=1.0.0&Typename=WLIS_UTM32&&REQUEST=GetFeature

returns something for you (I does not work for me but It might me an
internal URL) ?

Later,


K. Lessing wrote:

> Hi Bart,
> (and dear List Members),
>
> first of all I would like to apologize my late response on your quick
> answer!
> Unfortunatelly I was too busy to spend time on my WFS problem the last
> couple of hours.
>
> Regarding your answer I chanched the string:
>
> CONNECTION
> "http://babyz.uni-muenster.de/wfs/WFS?SERVICE=WFS&VERSION=1.0.0&Typename=WLIS_UTM32&"
>
> to:
> CONNECTION "http://babyz.uni-muenster.de?/wfs/WFS?"
> (you find the whole mapfile at the bottom of my answer)
>
> This resulted in the following gml-file which was stored in the /tmp
> directory:
>
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>404 Not Found</TITLE>
> </HEAD><BODY>
> <H1>Not Found</H1>
> The requested URL /wfs/wfs was not found on this server.<P>
> <HR>
> <ADDRESS>Oracle HTTP Server Powered by Apache/1.3.22 Server at
> BabyZ.geoinformatik.geo.uni-muenster.de Port 80</ADDRESS>
> </BODY></HTML>
>
>
> Than I chanced the CONNECTION string to:
>
> CONNECTION "http://babyz.uni-muenster.de?"
>
> This resulted in the message of following gml-file:
>
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>405 Method Not Allowed</TITLE>
> </HEAD><BODY>
> <H1>Method Not Allowed</H1>
> The requested method POST is not allowed for the URL /index.html.<P>
> <HR>
> <ADDRESS>Oracle HTTP Server Powered by Apache/1.3.22 Server at
> BabyZ.geoinformatik.geo.uni-muenster.de Port 80</ADDRESS>
> </BODY></HTML>
>
> As you mentioned earlier the WFS Server does not seem to be able to cope
> with the POST request.
> What does this mean ... and what can I do now?
> For the first steps with WFS it might be an more promissing way to start
> with another WFS server which is able to work with POST requests?
> Would you - Or anybody else - know another WFS server and would also be
> able to give me the necessary coordinates?
>
> many thanks beforehand
> Karsten
>
>
> (the changed mapfile)
>
> MAP
>   NAME "wfs_client"
>   SIZE 500 600
>   IMAGECOLOR 255 255 255
>   EXTENT 9000 5500000 1000000 5600000
>   STATUS ON
>   PROJECTION
>    "init=epsg:4326"
>   END
>
> WEB
>   LOG "wfs_client.log"
>    TEMPLATE "/srv/www/cgi-bin/docs/template5.htm"
>    IMAGEPATH /var/tmp/
>    IMAGEURL tmp
> END
>
>  OUTPUTFORMAT
>    NAME PNG
>    DRIVER "GDAL/PNG"
>    MIMETYPE "image/png"
>    IMAGEMODE RGBA
>    EXTENSION "png"
>  END
>
> LAYER
>    NAME "WaterLevel"
>    TYPE LINE
>    STATUS ON
>    CONNECTION "http://babyz.uni-muenster.de?"
>    CONNECTIONTYPE WFS
>    PROJECTION
>       "init=epsg:4326"
>    END
>    METADATA
>     "wfs_version" "1.0.0"
>     "wfs_typename" "bafg2"
>     "wfs_service" "WFS"
>     "wfs_connectiontimeout" "2000"
>     "wfs_latlonboundingbox" "9000 5500000 1000000 5600000"
>     "wfs_latlonboundingbox" "4.608 46.879 9.725 52.077"
>    END
> #    CLASSITEM "lineId"
>     CLASS
> #     EXPRESSION '124.0'
>      Color 200 200 200
>     END
>  END
> END
>
>
>
> Bart van den Eijnden schrieb:
>
>> Hi,
>>
>> could you try using a connection string without parameters. The typename
>> you set through metadata differs from the typename you specify in the
>> connection. The preferred way to do this now is to set all the variables
>> through the METADATA and not in the connection string.
>>
>> CONNECTION "http://babyz.uni-muenster.de/wfs/WFS?"
>>
>> Also, does your WFS server support HTTP POST requests?
>>
>> Are there any error messages in your error logs? Is the gml actually
>> being
>> downloaded to the tmp directory?
>>
>> Best regards,
>> Bart
>>
>> On Mon, 29 Nov 2004 16:56:13 +0100, K. Lessing <umn at KARSTEN-LESSING.DE>
>> wrote:
>>
>>> Dear List member,
>>>
>>> I am new with the work on mapserver as wfs-client.
>>> I am running Mapserver 4.2.5. with the support of all necessary
>>> libraries on
>>> Suse 9.1.
>>> I read the How2 instruction page for setting up an WFS-Layer.
>>> Unfortunatelly it does not work.
>>> Does anybody maybe have a clue what could be wrong?
>>> Please have a look on the following map file.
>>>
>>> thanx beforehand
>>> K. Lessing
>>>
>>>
>>> MAP
>>> NAME "wfs_client"
>>> SIZE 500 700
>>> IMAGECOLOR 50 50 50
>>> EXTENT 9000 5500000 1000000 5600000
>>> STATUS ON
>>> PROJECTION
>>> "init=epsg:32632"
>>> END
>>>
>>> WEB
>>> TEMPLATE "template5.html"
>>> IMAGEPATH "/srv/www/htdocs/tmp/"
>>> IMAGEURL "/tmp/"
>>> END
>>>
>>> OUTPUTFORMAT
>>> NAME "Farbenfroh"
>>> DRIVER "GDAL/JPEG"
>>> MIMETYPE "image/jpeg"
>>> IMAGEMODE RGB
>>> EXTENSION "jpeg"
>>> END
>>>
>>> LAYER
>>> NAME "WaterLevel"
>>> TYPE LINE
>>> STATUS DEFAULT
>>> CONNECTION
>>> "http://babyz.uni-muenster.de/wfs/WFS?SERVICE=WFS&VERSION=1.0.0&Typename=WLIS_UTM32&"
>>>
>>>
>>> CONNECTIONTYPE WFS
>>> PROJECTION
>>> "init=epsg:32632"
>>> END
>>> METADATA
>>> "wfs_version" "1.0.0"
>>> "wfs_typename" "bafg2"
>>> "wfs_service" "WFS"
>>> "wfs_connectiontimeout" "60"
>>> "wfs_latlonboundingbox" "9000 5500000 1000000 5600000"
>>> "wfs_latlonboundingbox" "4.608 46.879 9.725 52.077"
>>> END
>>> CLASSITEM "lineId"
>>> CLASS
>>> EXPRESSION '124.0'
>>> Color 200 200 200
>>> END
>>> END
>>> END
>>
>>
>>
>>
>>
>> --
>> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
>>
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list