[TinyOWS-users] Error if GetFeature begins with <?xml version="1.0"encoding="UTF-8"?>

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Mon Jun 6 12:02:41 EST 2011


Hi,

This case is solved. It was a far too common multi-problem case with a WFS client that has been developed against one certain WFS server mark. This time there were two real problems: client do not use Content-Type in the headers and it does add srsName into WFS 1.0.0 GetFeature request. In addition to these issues this client is using <?xml version="1.0"encoding="UTF-8"?> in the beginning of the POST body which is not so usual with WFS clients. However, TinyOWS does accept xml version and encoding. I was just not careful enough and my test request was actually missing the Content-Type from the headers.

-Jukka Rahkonen-

Rahkonen Jukka wrote:

> [TinyOWS-users] Error if GetFeature begins with <?xml version="1.0"encoding="UTF-8"?>
 
> Hi,

> I have noticed that there are WFS clients which are adding 
> <?xml version="1.0" encoding="UTF-8"?>
> into the beginning of each GetFeature POST message, and that leads to a TinyOWS error.
> The whole failing raw message is as follows.


> User-Agent: Jakarta Commons-HttpClient/3.0-beta1
> Host: 188.64.1.61
> Content-Type: text/xml
> Connection: Keep-Alive
> Content-Length: 346


> <?xml version="1.0" encoding="UTF-8"?><wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" maxFeatures="1000" outputFormat="GML2"><wfs:Query xmlns:tows="http://www.tinyows.org/" typeName="tows:france"></wfs:Query></wfs:GetFeature>

> The request is accepted if I wipe out the <?xml version="1.0" encoding="UTF-8"?> part from the beginning of the message. Is is > forbidden to have that xml information in the beginning of the file, or is it TinyOWS which behaves in a wrong way?

> The same historical client has another trouble as well, it does not add "Content-Type: text/xml" into the headers and that will > lead to an error as well. The same question here, is Content-Type in the headerst compulsory or is TinyOWS too strict?

> Regards, 

> -Jukka Rahkonen-

_______________________________________________
TinyOWS-users mailing list
TinyOWS-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tinyows-users




More information about the TinyOWS-users mailing list