[mapserver-users] WFS - invalid XML in POST request?

Miloslav Kmeť miloslav.kmet at gmail.com
Fri Apr 16 04:26:58 EDT 2010


Hi. I tried the following request: http://pastebin.ca/1862976

I get an error from the service:
Xml Parsing failed.
Reason:A declaration was not closed.

Linepos:1
Source:<.

The new XML you wrote seems to be valid, so I think, this is a bug in ArcGIS, 
so I'll contact our supplier about that. If I'll get a response, I'll let you 
know about that.

If you don't have any ArcGIS WFS service to test, don't hesitate to try ours:
http://globus.sazp.sk/arcgis/services/nipi/protected_sites/MapServer/WFSServer?service=wfs&request=getcapabilities&version=1.0.0

I would like to update the ticket, but I have problem to get to trac. (Request 
timeouts).

Thank you.

Below is the full HTTP communication with the new XML:

kmet at book:/tmp$ telnet globus.sazp.sk 80
Trying 172.16.100.12...
Connected to globus.sazp.sk.
Escape character is '^]'.
POST /arcgis/services/nipi/protected_sites/MapServer/WFSServer HTTP/1.1
User-Agent: MapServer/5.6.3 libcurl/7.19.7
Host: globus.sazp.sk
Accept: */*
Content-Type: text/xml
Content-Length: 705

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="1.0.0"
        maxFeatures="10000" outputFormat="GML2" 
xmlns:wfs="http://www.opengis.net/wfs"
        xmlns:gml="http://www.opengis.net/gml" 
xmlns:ogc="http://www.opengis.net/ogc"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
        <wfs:Query typeName="nps:MCHU">
                <ogc:Filter>
                        <ogc:BBOX>
                                <ogc:PropertyName>Geometry</ogc:PropertyName>
                                <gml:Box>
                                        <gml:coordinates>-613875.000000,-1351366.235392 
-143625.000000,-1116633.764608</gml:coordinates>
                                </gml:Box>
                        </ogc:BBOX>
                </ogc:Filter>
        </wfs:Query>
</wfs:GetFeature>
HTTP/1.1 200 OK
Date: Fri, 16 Apr 2010 07:54:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/xml
Content-Length: 299

<ows:ExceptionReport version='1.1.0' language='en' 
xmlns:ows='http://www.opengis.net/ows'><ows:Exception 
exceptionCode='NoApplicableCode'><ows:ExceptionText>Xml Parsing failed.
Reason:A declaration was not closed.

Linepos:1
Source:&lt;.</ows:ExceptionText></ows:Exception></ows:ExceptionReport>HTTP/1.1 
400 Bad Request
Content-Type: text/html
Date: Fri, 16 Apr 2010 07:54:24 GMT
Connection: close
Content-Length: 35

<h1>Bad Request (Invalid Verb)</h1>Connection closed by foreign host.
kmet at book:/tmp$ <ows:ExceptionText>Xml Parsing failed.

On piatok 16 Apríl 2010 02:15:46 you wrote:
> Would something like this work for the server:
> 
> <?xml version="1.0" ?><wfs:GetFeature  service="WFS" version="1.0.0"
> maxFeatures="10000" outputFormat="GML2"
>   xmlns:wfs="http://www.opengis.net/wfs"
>   xmlns:gml="http://www.opengis.net/gml"
>   xmlns:ogc="http://www.opengis.net/ogc"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
> <wfs:Query typeName="nps:MCHU">
> <ogc:Filter>
> <ogc:BBOX>
> <ogc:PropertyName>Geometry</ogc:PropertyName>
> <gml:Box>
> <gml:coordinates>-613875.000000,-1351366.235392
> -143625.000000,-1116633.764608</gml:coordinates>
> </gml:Box>
> </ogc:BBOX>
> </ogc:Filter></wfs:Query>
> </wfs:GetFeature>
> 
> 
> Note that there is a bug [1] on this (and the ogc name space you
> reported a a few weeks ago). Please take the time to check and update
> the bug since I can not test it against an Arc Server.
> 
> [1]: http://trac.osgeo.org/mapserver/ticket/3414
> 
> regards,



More information about the mapserver-users mailing list