[Mapbender-commits] r9505 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jun 3 05:27:34 PDT 2016
Author: armin11
Date: 2016-06-03 05:27:34 -0700 (Fri, 03 Jun 2016)
New Revision: 9505
Modified:
trunk/mapbender/http/classes/class_wfs_2_0_factory.php
Log:
Fix for wfs 2.0.0 arcgis registration - some things have to be done for metadata parsing - to be tested with http://geoserv.weichand.de:8080/geoserver/wfs?request=GetCapabilities&service=WFS&VERSION=2.0.0
Modified: trunk/mapbender/http/classes/class_wfs_2_0_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_2_0_factory.php 2016-06-02 09:53:25 UTC (rev 9504)
+++ trunk/mapbender/http/classes/class_wfs_2_0_factory.php 2016-06-03 12:27:34 UTC (rev 9505)
@@ -336,8 +336,13 @@
//read all relevant information an put them into the mapbender wfs object
//xmlns="http://www.opengis.net/wfs"
//Setup default namespace
-
- $wfs20Cap->registerXPathNamespace("wfs", "http://www.opengis.net/wfs");
+ $namespaces = $wfs20Cap->getNamespaces(true);
+ if(isset($namespaces[""])) { // if you have a default namespace
+ // register a prefix for that default namespace:
+ $wfs20Cap->registerXPathNamespace("wfs", $namespaces[""]);
+ } else {
+ $wfs20Cap->registerXPathNamespace("wfs", "http://www.opengis.net/wfs/2.0");
+ }
$wfs20Cap->registerXPathNamespace("ows", "http://www.opengis.net/ows");
$wfs20Cap->registerXPathNamespace("gml", "http://www.opengis.net/gml");
$wfs20Cap->registerXPathNamespace("ogc", "http://www.opengis.net/ogc");
@@ -443,8 +448,8 @@
$i_mdu = 0;
foreach ($metadataURLArray as $metadataURL) {
//$e = new mb_exception("other srs: ".$otherSRS);
- $featuretype_metadataUrl[$i_mdu]->href = $metadataURL;
- $e = new mb_notice("metadataurl: ".$metadataURL);
+ $featuretype_metadataUrl[$i_mdu]->href = $metadataURL->attributes()->xlinkhref;
+ $e = new mb_notice("metadataurl: ".$metadataURL->attributes()->xlinkhref);
$featuretype_metadataUrl[$i_mdu]->type = $metadataURL->attributes()->type;
$e = new mb_notice("type: ".$featuretype_metadataUrl[$i_mdu]->type);
$featuretype_metadataUrl[$i_mdu]->format = $metadataURL->attributes()->format;
More information about the Mapbender_commits
mailing list