Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFS] MapServer doesn't add namespace definition in its GetFeature request #4467

Closed
wants to merge 4 commits into from

Conversation

tbonfort
Copy link
Member

Namespace should be added in each GetFeature request sent by MapServer with GET and POST method. ArcGIS and GeoServer need them and xml should only validate with them.

Here is a wrong POST request sent by MS:

<?xml version="1.0"?>
 <wfs:GetFeature service="WFS" version="1.0.0" maxFeatures="200" 
 outputFormat="GML2">
     <wfs:Query typeName="ref:Parcelles">
         <ogc:Filter>
             <ogc:BBOX>
                <ogc:PropertyName>Geometry</ogc:PropertyName>
                   <gml:Box>
                      <gml:coordinates>2.022184,48.116468  3.923033,49.118807</gml:coordinates></gml:Box>
             </ogc:BBOX>
         </ogc:Filter>
     </wfs:Query>
 </wfs:GetFeature>

Here is a good POST request :

<?xml version="1.0"?>
 <wfs:GetFeature service="WFS" version="1.0.0" maxFeatures="200" 
 outputFormat="GML2" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml">
     <wfs:Query typeName="ref:Parcelles">
         <ogc:Filter>
             <ogc:BBOX>
                <ogc:PropertyName>Geometry</ogc:PropertyName>
                   <gml:Box>
                      <gml:coordinates>2.022184,48.116468  3.923033,49.118807</gml:coordinates></gml:Box>
             </ogc:BBOX>
         </ogc:Filter>
     </wfs:Query>
 </wfs:GetFeature>

A PR will be sent later. More testing are needed with MapServer and ArcGIS (next week) WFS services.

@yjacolin
Copy link
Contributor Author

Here is my branch. I will do more test with MapServer (today) and ArcGIS (next week) WFS Services.

https://github.com/yjacolin/mapserver/compare/namespaceWFSClient

There is just one issue I don't know how to manage:

See https://github.com/yjacolin/mapserver/blob/master/mapwfslayer.c#L149

Using ogc namespace imply to add xml namespace at the first element but this is not the case at this line. We can add it and change MS' behaviour or not. Any idea?

@yjacolin
Copy link
Contributor Author

  • Test on WFS service from GeoServer 2.1 successful.
  • Test on WFS service from MapServer 5.6.5 successful.
  • Test on WFS Service from MapServer 6.0.3, master and 6.0.3 with this patch are not successful (seems BBOX Filter by POST method is broken for release 6.0 branch and master).

@yjacolin
Copy link
Contributor Author

  • Test on WFS Service from MapServer 6.0.3, master and 6.0.3 with this patch successful

@tbonfort
Copy link
Member

@yjacolin, can you merge the updated branch-6-2 into this branch so this can be tested. thanks

@Schpidi
Copy link
Member

Schpidi commented Sep 27, 2012

AFAIK the schemaLocation should point to http://schemas.opengis.net/wfs/1.0.0/wfs.xsd, the all-components as mandated by OGC.

@tbonfort
Copy link
Member

@yjacolin are you able to validate/fix this very quickly (i.e. today) as we are releasing beta4. If not, I'll remilestone this for 6.2.1

@yjacolin
Copy link
Contributor Author

Le 27/09/2012 10:26, Thomas Bonfort a écrit :

@yjacolin https://github.com/yjacolin are you able to validate/fix
this very quickly (i.e. today) as we are releasing beta4. If not, I'll
remilestone this for 6.2.1


Reply to this email directly or view it on GitHub
#4467 (comment).

Unfortunately I was not online yesterday.

I guess it is too late now to do a PR?

Y.

@tbonfort tbonfort closed this in 1903b7a Sep 29, 2012
@tbonfort
Copy link
Member

rebased/squashed/applied in 1903b7a

mkofahl pushed a commit to faegi/mapserver that referenced this pull request Apr 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants