Opened 17 years ago

Last modified 17 years ago

#2392 closed defect

WFS: posting doesn't always work — at Initial Version

Reported by: fsteggink Owned by: mapserverbugs
Priority: normal Milestone: 5.2 release
Component: WFS Server Version: 4.8
Severity: normal Keywords:
Cc: jmckenna

Description

Hi,

I'm developing a WFS client, which I tested with multiple servers. I discovered that there were some problems with using HTTP POST to MapServer. (The default HTTP method of my client is GET, which works fine.) I've started a discussion on the MapServer users list. More information can be found there. I haven't installed MapServer myself, but was using public WFS servers on the internet.

Here are the results of one particular server (quoted from my mail): [quote] Well, it turned out that it depends on the presence of carriage returns in the post data if it will succeed or not. (The service URL is http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/config.map and the version is 4.8.3.)

Posting this will succeed (all on one line): <?xml version="1.0" encoding="iso-8859-1"?><wfs:DescribeFeatureType version="1.0.0" service="WFS" xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:TypeName>wfs: envirodat</wfs:TypeName></wfs:DescribeFeatureType>

Posting this will not: <?xml version="1.0" encoding="iso-8859-1"?> <wfs:DescribeFeatureType version="1.0.0" service="WFS" xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<wfs:TypeName>wfs:envirodat</wfs:TypeName>

</wfs:DescribeFeatureType>

The post data is not URL encoded. And posting the successful post body to http://map.ns.ec.gc.ca/envdat/map.aspx gives the infamous "no template provided" error. quote This says two things.

  1. There is a problem with the online resource URL's. (This is the last URL mentioned, and the online resource URL's are the URL's which are supposed to be used, instead of the base URL which is used for the initial GetCapabilities request only.) I found that multiple servers had this problem.
  2. It apparently matters if there are carriage returns and/or line feeds in the XML data. Very strange. (If they are present, the service times out, and finally returns a 502 error after five minutes.)

The other services I have tested are:

Only the last service worked correctly with post data.

Since I don't have any MapServer experience (apart from testing my client against the WFS service), it is very hard to tell what the problem(s) is/are. Some people suggest that it could be a configuration / wrapper issue, but as I showed, there is also an issue with handling the data itself (the linebreaks). As I said, more information can be found in the e-mail thread, but this ticket contains the latest and most succint information.

Change History (0)

Note: See TracTickets for help on using tickets.