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,

Miloslav Kmeť wrote:
Hi. I am trying to get working WFS with POST request method. My layer def:
LAYER
    DEBUG 5
    NAME "MCHU"
    STATUS ON
    TYPE POLYGON
    CONNECTIONTYPE WFS
CONNECTION "http://globus.sazp.sk/arcgis/services/nipi/protected_sites/MapServer/WFSServer"; METADATA
      "wfs_version" "1.0.0"
      "wfs_service" "WFS"
      "wfs_srs" "epsg:102067"
      "wfs_typename" "nps:MCHU"
"wfs_maxfeatures" "10000" END
END

( http://pastebin.ca/1862437 )

I read in the documentation, that without wfs_request_method in METADATA the default request method is POST.

When mapserver do POST, the WFS service complains:
Xml Parsing failed. Reason:Reference to undeclared namespace prefix: 'wfs'.

Below is the full communication between mapserver and ArcGIS server. It seems like, there are some namespace declaration missing, but I cannot figure out the right request XML.

Thanks

( http://pastebin.ca/1862442 ):

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: 386

<?xml version="1.0" ?>
<wfs:GetFeature
service="WFS"
version="1.0.0"
maxFeatures="10000"
outputFormat="GML2">
<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: Thu, 15 Apr 2010 20:28:35 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: 358

<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:Reference to undeclared namespace prefix: &apos;wfs&apos;.

Linepos:21
Source:outputFormat=&quot;GML2&quot;&gt;.</ows:ExceptionText></ows:Exception></ows:ExceptionReport>


--
----------------------------------------------------------------
Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.ca http://www.dmsolutions.ca/

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


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to