{"action":"opened","issue":{"url":"https://api.github.com/repos/B3Partners/kaartenbalie/issues/5","repository_url":"https://api.github.com/repos/B3Partners/kaartenbalie","labels_url":"https://api.github.com/repos/B3Partners/kaartenbalie/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/B3Partners/kaartenbalie/issues/5/comments","events_url":"https://api.github.com/repos/B3Partners/kaartenbalie/issues/5/events","html_url":"https://github.com/B3Partners/kaartenbalie/issues/5","id":190067365,"number":5,"title":"WFS GetFeature: XML Namespace prefix niet herkend","user":{"login":"justb4","id":582630,"avatar_url":"https://avatars.githubusercontent.com/u/582630?v=3","gravatar_id":"","url":"https://api.github.com/users/justb4","html_url":"https://github.com/justb4","followers_url":"https://api.github.com/users/justb4/followers","following_url":"https://api.github.com/users/justb4/following{/other_user}","gists_url":"https://api.github.com/users/justb4/gists{/gist_id}","starred_url":"https://api.github.com/users/justb4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justb4/subscriptions","organizations_url":"https://api.github.com/users/justb4/orgs","repos_url":"https://api.github.com/users/justb4/repos","events_url":"https://api.github.com/users/justb4/events{/privacy}","received_events_url":"https://api.github.com/users/justb4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-17T14:48:11Z","updated_at":"2016-11-17T14:48:11Z","closed_at":null,"body":"Probleem gevonden in KB 4.2.7 met Heron Viewer maar de afhandeling binnen viewer is door standaard GeoExt (1.1) en OpenLayers (2.12) WFS-handling. \r\n\r\n**Probleem**\r\nWanneer naar een in KB geconfigureerde WFS een ``GetFeature`` wordt gestuurd met daarin een andere NameSPace (NS) Prefix dan die uit de originele GetCapabilities, komt een foutmelding. Terwijl de NS prefix wel expliciet binnen het ``GetFeature`` element wordt gedefinieërd.\r\n\r\nVoorbeeld hieronder. De ``GetCapabilities`` uit de KB. In de ``Capabilities`` is de featurePrefix ``\"kad:\"``:  voor de laag ``KDWFS_hockeyclubs`` zoals hier, dus ``xmlns:kad=\"http://innovatie.kadaster.nl\"``\r\n\r\n```\r\n<WFS_Capabilities xmlns=\"http://www.opengis.net/wfs\" xmlns:nlextract=\"http://data.nlextract.nl\" [^] xmlns:bag=\"http://www.openbag.nl\" [^] xmlns:osgeonl=\"http://osgeo.nl\" \r\nxmlns:heron=\"http://heron-mc.org\" [^] xmlns:kad=\"http://innovatie.kadaster.nl\"\r\n xmlns:ogc=\"http://www.opengis.net/ogc\" [^] xmlns:wfs=\"http://www.opengis.net/wfs\" \r\nxmlns:ows=\"http://www.opengis.net/ows\" [^] \r\nxmlns:xlink=\"http://www.w3.org/1999/xlink\"xmlns:gml=\"http://www.opengis.net/gml\" [^] \r\nxmlns:dummy=\"http://dummy.com\" [^] xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n[^] xsi:schemaLocation=\"http://www.opengis.net/wfs [^] \r\nhttp://schemas.opengis.net/wfs/1.1.0/wfs.xsd\" [^] version=\"1.1.0\" updateSequence=\"1285\">\r\n\r\n.\r\n.\r\n<FeatureTypeList><FeatureType><Name>kad:KDWFS_hockeyclubs</Name>\r\n<Title>hockeyclubs</Title><Abstract>Alle hockeyclubs, locaties, in Nederland.</Abstract>\r\n<ows:Keywords><ows:Keyword>features</ows:Keyword>\r\n<ows:Keyword>hockeyclubs</ows:Keyword></ows:Keywords><DefaultSRS>urn:x-ogc:def:crs:EPSG:28992</DefaultSRS><ows:WGS84BoundingBox \r\ncrs=\"urn:ogc:def:crs:OGC:2:84\"><ows:LowerCorner>3.4396630101359507 \r\n50.80790500500096</ows:LowerCorner><ows:UpperCorner>7.1191888183781655 \r\n53.36842213221817</ows:UpperCorner></ows:WGS84BoundingBox></FeatureType>\r\n.\r\n.\r\n.\r\n```\r\n\r\nEchter de WFS-handlers in OpenLayers en GeoExt \"onthouden\" niet de ``featurePrefixes`` zoals ``kad:``, ook omdat deze mbt de de XML standaard niet van belang zijn. Het gaat om de (unieke) NS URI ``http://innovatie.kadaster.nl``. In de ``GetFeature`` stuurt OpenLayers dan ook:\r\n\r\n```\r\n<wfs:GetFeature \r\nxmlns:wfs=\"http://www.opengis.net/wfs\" [^] service=\"WFS\" \r\nversion=\"1.1.0\" outputFormat=\"GML2\" \r\nxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" [^] xsi:schemaLocation=\"http://www.opengis.net/wfs [^] http://schemas.opengis.net/wfs/1.1.0/wfs.xsd\">\r\n<wfs:Query [^] typeName=\"feature:KDWFS_hockeyclubs\" srsName=\"EPSG:28992\" \r\nxmlns:feature=\"http://innovatie.kadaster.nl\">\r\n<ogc:Filter [^] xmlns:ogc=\"http://www.opengis.net/ogc\">\r\n<ogc:BBOX><gml:Envelope [^] xmlns:gml=\"http://www.opengis.net/gml\" [^] srsName=\"EPSG:28992\">\r\n<gml:lowerCorner>-641508.16 230756.8</gml:lowerCorner>\r\n<gml:upperCorner>951508.16 695243.2</gml:upperCorner>\r\n</gml:Envelope>\r\n</ogc:BBOX>\r\n</ogc:Filter>\r\n</wfs:Query>\r\n</wfs:GetFeature>\r\n```\r\n\r\nKB geeft foutmelding omdat deze blijkbaar ``kad:`` als NS prefix verwacht. De Heron/OpenLayers ``GetFeature`` request gebruikt \"feature:\" binnen ``<wfs:Query>`` als featurePrefix maar wel gebonden aan de goede featureNS \"http://innovatie.kadaster.nl\". \r\n\r\nAls ik rechtstreeks vanuit Heron naar de onderliggende WFS server http://kademo.nl/gs2/wfs? ga, gaat het wel goed. Dus GeoServer/MapServer handelt deze standaard NS constructie, m.i. terecht, wel goed af.\r\n\r\n**Oplossing**\r\n\r\nKB WFS handler moet niet uitgaan van originele NS prefixnamen maar de definitie via de URI volgen/gebruiken."}}
{"actor":{"display_login":"justb4"}}