Quellcode durchsuchen

fixed wfs getCapabilities

Piotr Labudda vor 9 Jahren
Ursprung
Commit
3565bafab3
1 geänderte Dateien mit 399 neuen und 480 gelöschten Zeilen
  1. 399 480
      SE/se-lib/Api/WfsServerBase.php

+ 399 - 480
SE/se-lib/Api/WfsServerBase.php

@@ -5,6 +5,7 @@ Lib::loadClass('Api_WfsGeomTypeConverter');
 Lib::loadClass('Api_WfsNs');
 Lib::loadClass('Request');
 Lib::loadClass('Core_AclHelper');
+Lib::loadClass('Core_XMLWriter');
 
 class Api_WfsServerBase {
 
@@ -154,292 +155,404 @@ class Api_WfsServerBase {
 			print_r($fullTblAclList);
 			die("\n" . '.EOF - DBG_ACL');
 		}
-		echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
-		?>
-<WFS_Capabilities
-				  xmlns="http://www.opengis.net/wfs"
-				  xmlns:ogc="http://www.opengis.net/ogc"
-				  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-				  <?= $this->_printXmlNamespaceList(); ?>
-				  <?= $this->_getXmlSchemaLocation(); ?>
-					version="1.0.0">
-  <Service>
-    <Name>WFS</Name>
-    <Title><?= $serviceTitle; ?></Title>
-    <Abstract><?= $serviceDescription; ?></Abstract>
-    <Keywords>WFS, WMS</Keywords>
-    <OnlineResource><?= $wfsServerUrl; ?></OnlineResource>
-    <Fees>NONE</Fees>
-    <AccessConstraints>NONE</AccessConstraints>
-  </Service>
-  <Capability>
-    <Request>
-<?php $this->_printGetCapabilitiesXml($wfsServerUrl); ?>
-<?php $this->_printDescribeFeatureTypeXml($wfsServerUrl); ?>
-<?php $this->_printGetFeatureXml($wfsServerUrl); ?>
-<?php $this->_printTransactionXml($wfsServerUrl); ?>
-<?php $this->_printLockFeatureXml($wfsServerUrl); ?>
-<?php $this->_printGetFeatureWithLockXml($wfsServerUrl); ?>
-    </Request>
-  </Capability>
-  <FeatureTypeList>
-    <Operations>
-      <Query />
-      <Insert />
-      <Update />
-      <Delete />
-      <Lock />
-    </Operations>
-<?php $this->_printFeatureTypeListXml(); ?>
-  </FeatureTypeList>
-  <ogc:Filter_Capabilities>
-    <ogc:Spatial_Capabilities>
-      <ogc:Spatial_Operators>
-        <ogc:Disjoint />
-        <ogc:Equals />
-        <ogc:DWithin />
-        <ogc:Beyond />
-        <ogc:Intersect />
-        <ogc:Touches />
-        <ogc:Crosses />
-        <ogc:Within />
-        <ogc:Contains />
-        <ogc:Overlaps />
-        <ogc:BBOX />
-      </ogc:Spatial_Operators>
-    </ogc:Spatial_Capabilities>
-    <ogc:Scalar_Capabilities>
-      <ogc:Logical_Operators />
-      <ogc:Comparison_Operators>
-        <ogc:Simple_Comparisons />
-        <ogc:Between />
-        <ogc:Like />
-        <ogc:NullCheck />
-      </ogc:Comparison_Operators>
-      <ogc:Arithmetic_Operators>
-        <ogc:Simple_Arithmetic />
-        <ogc:Functions>
-          <ogc:Function_Names>
-            <ogc:Function_Name nArgs="1">abs</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">abs_2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">abs_3</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">abs_4</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">acos</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">AddCoverages</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">Aggregate</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Area</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">area2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">AreaGrid</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">asin</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">atan</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">atan2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="14">BarnesSurface</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">between</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">boundary</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">boundaryDimension</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Bounds</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">buffer</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">BufferFeatureCollection</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">bufferWithSegments</ogc:Function_Name>
-            <ogc:Function_Name nArgs="7">Categorize</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">ceil</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Centroid</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">classify</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">Clip</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">CollectGeometries</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Average</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Bounds</ogc:Function_Name>
-            <ogc:Function_Name nArgs="0">Collection_Count</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Max</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Median</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Min</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Sum</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Collection_Unique</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Concatenate</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">contains</ogc:Function_Name>
-            <ogc:Function_Name nArgs="7">Contour</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">convert</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">convexHull</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">cos</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">Count</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">CropCoverage</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">crosses</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">dateFormat</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">dateParse</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">difference</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">dimension</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">disjoint</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">disjoint3D</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">distance</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">distance3D</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">double2bool</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">endAngle</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">endPoint</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">env</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">envelope</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">EqualInterval</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">equalsExact</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">equalsExactTolerance</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">equalTo</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">exp</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">exteriorRing</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Feature</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">floor</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">geometryType</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">geomFromWKT</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">geomLength</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">getGeometryN</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">getX</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">getY</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">getz</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">greaterEqualThan</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">greaterThan</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">Grid</ogc:Function_Name>
-            <ogc:Function_Name nArgs="7">Heatmap</ogc:Function_Name>
-            <ogc:Function_Name nArgs="0">id</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">IEEEremainder</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">if_then_else</ogc:Function_Name>
-            <ogc:Function_Name nArgs="11">in10</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">in2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">in3</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">in4</ogc:Function_Name>
-            <ogc:Function_Name nArgs="6">in5</ogc:Function_Name>
-            <ogc:Function_Name nArgs="7">in6</ogc:Function_Name>
-            <ogc:Function_Name nArgs="8">in7</ogc:Function_Name>
-            <ogc:Function_Name nArgs="9">in8</ogc:Function_Name>
-            <ogc:Function_Name nArgs="10">in9</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">InclusionFeatureCollection</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">int2bbool</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">int2ddouble</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">interiorPoint</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">interiorRingN</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Interpolate</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">intersection</ogc:Function_Name>
-            <ogc:Function_Name nArgs="7">IntersectionFeatureCollection</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">intersects</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">intersects3D</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">isClosed</ogc:Function_Name>
-            <ogc:Function_Name nArgs="0">isCoverage</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">isEmpty</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">isLike</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">isNull</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">isometric</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">isRing</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">isSimple</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">isValid</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">isWithinDistance</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">isWithinDistance3D</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">Jenks</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">length</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">lessEqualThan</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">lessThan</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">list</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">log</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">LRSGeocode</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">LRSMeasure</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">LRSSegment</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">max</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">max_2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">max_3</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">max_4</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">min</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">min_2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">min_3</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">min_4</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">mincircle</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">minimumdiameter</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">minrectangle</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">modulo</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">MultiplyCoverages</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Nearest</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">not</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">notEqualTo</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">numberFormat</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">numberFormat2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">numGeometries</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">numInteriorRing</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">numPoints</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">octagonalenvelope</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">offset</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">overlaps</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">parameter</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">parseBoolean</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">parseDouble</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">parseInt</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">parseLong</ogc:Function_Name>
-            <ogc:Function_Name nArgs="0">pi</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">PointBuffers</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">pointN</ogc:Function_Name>
-            <ogc:Function_Name nArgs="7">PointStacker</ogc:Function_Name>
-            <ogc:Function_Name nArgs="6">PolygonExtraction</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">pow</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">property</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">PropertyExists</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">Quantile</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Query</ogc:Function_Name>
-            <ogc:Function_Name nArgs="0">random</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">RangeLookup</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">RasterAsPointCollection</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">RasterZonalStatistics</ogc:Function_Name>
-            <ogc:Function_Name nArgs="5">Recode</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">RectangularClip</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">relate</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">relatePattern</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Reproject</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">rint</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">round</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">round_2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">roundDouble</ogc:Function_Name>
-            <ogc:Function_Name nArgs="6">ScaleCoverage</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">sdo_nn</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">setCRS</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Simplify</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">sin</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">Snap</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">sqrt</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">StandardDeviation</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">startAngle</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">startPoint</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">strCapitalize</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strConcat</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strEndsWith</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strEqualsIgnoreCase</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strIndexOf</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strLastIndexOf</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">strLength</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strMatches</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">strPosition</ogc:Function_Name>
-            <ogc:Function_Name nArgs="4">strReplace</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strStartsWith</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">strSubstring</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">strSubstringStart</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">strToLowerCase</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">strToUpperCase</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">strTrim</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">strTrim2</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">StyleCoverage</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">symDifference</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">tan</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">toDegrees</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">toRadians</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">touches</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">toWKT</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">Transform</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">union</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">UnionFeatureCollection</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">Unique</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">UniqueInterval</ogc:Function_Name>
-            <ogc:Function_Name nArgs="6">VectorToRaster</ogc:Function_Name>
-            <ogc:Function_Name nArgs="3">VectorZonalStatistics</ogc:Function_Name>
-            <ogc:Function_Name nArgs="1">vertices</ogc:Function_Name>
-            <ogc:Function_Name nArgs="2">within</ogc:Function_Name>
-          </ogc:Function_Names>
-        </ogc:Functions>
-      </ogc:Arithmetic_Operators>
-    </ogc:Scalar_Capabilities>
-  </ogc:Filter_Capabilities>
-</WFS_Capabilities>
-		<?php
+		$xmlWriter = new Core_XMLWriter();
+		if (!$xmlWriter) throw new HttpException("Error no XMLWriter", 404);
+		$xmlWriter->openUri('php://output');
+		$xmlWriter->setIndent(true);
+		$xmlWriter->startDocument('1.0','UTF-8');
+		$xmlWriter->startElement('WFS_Capabilities');
+		$xmlWriter->writeAttribute('xmlns', 'http://www.opengis.net/wfs');
+		$xmlWriter->writeAttribute('xmlns:ogc', 'http://www.opengis.net/ogc');
+		$xmlWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
+		foreach (Api_WfsNs::getNsList() as $uri => $prefix) {
+			$xmlWriter->writeAttribute("xmlns:{$prefix}", $uri);
+		}
+		$schemaLocations = [];
+		//$schemaLocations[] = 'http://www.opengis.net/wfs http://webgis.regione.sardegna.it:80/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd';// @from http://webgis.regione.sardegna.it/geoserver/ows?service=WFS&request=GetCapabilities
+		if (!empty($schemaLocations)) $xmlWriter->writeAttribute('xsi:schemaLocation', implode(' ', $schemaLocations));
+		$xmlWriter->writeAttribute('version', "1.0.0");
+		$xmlWriter->h('Service', [
+			['Name', "WFS"],
+			['Title', $serviceTitle],
+			['Abstract', $serviceDescription],
+			['Keywords', "WFS, WMS"],
+			['OnlineResource', $wfsServerUrl],
+			['Fees', "NONE"],
+			['AccessConstraints', "NONE"],
+		]);
+		$xmlWriter->h('Capability', [
+			[ 'Request', [
+				[ 'GetCapabilities', [
+					[ 'DCPType', [
+						[ 'HTTP', [
+							[ 'Get', [ 'onlineResource' => "{$wfsServerUrl}?REQUEST=GetCapabilities" ], null ]
+						] ]
+					] ],
+					[ 'DCPType', [
+						[ 'HTTP', [
+							[ 'Post', [ 'onlineResource' => "{$wfsServerUrl}" ], null ]
+						] ]
+					] ],
+				] ]
+			] ]
+		]);
+		$xmlWriter->h('DescribeFeatureType', [
+			[ 'SchemaDescriptionLanguage', [
+				[ 'XMLSCHEMA', null ]
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Get', ['onlineResource' => "{$wfsServerUrl}?REQUEST=DescribeFeatureType"], null ]
+				] ]
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Post', ['onlineResource' => "{$wfsServerUrl}"], null ]
+				] ]
+			] ],
+		]);
+		$xmlWriter->h('GetFeature', [// $this->_printGetFeatureXml($wfsServerUrl);
+			[ 'ResultFormat', [
+				'WFSKMLOutputFormat',
+				'GML2',
+				'GML3',
+				'SHAPE-ZIP',
+				'CSV',
+				'JSON',
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Get', ['onlineResource' => "{$wfsServerUrl}?REQUEST=GetFeature"], null ]
+				] ]
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Post', ['onlineResource' => "{$wfsServerUrl}"], null ]
+				] ]
+			] ],
+		]);
+		$xmlWriter->h('Transaction', [
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Get', ['onlineResource' => "{$wfsServerUrl}?REQUEST=Transaction"], null ]
+				] ]
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Post', ['onlineResource' => "{$wfsServerUrl}"], null ]
+				] ]
+			] ],
+		]);
+		$xmlWriter->h('LockFeature', [
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Get', ['onlineResource' => "{$wfsServerUrl}?REQUEST=LockFeature"], null ]
+				] ]
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Post', ['onlineResource' => "{$wfsServerUrl}"], null ]
+				] ]
+			] ],
+		]);
+		$xmlWriter->h('GetFeatureWithLock', [
+			[ 'ResultFormat', [
+				'GML2'
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Get', ['onlineResource' => "{$wfsServerUrl}?REQUEST=GetFeatureWithLock"], null ]
+				] ]
+			] ],
+			[ 'DCPType', [
+				[ 'HTTP', [
+					[ 'Post', ['onlineResource' => "{$wfsServerUrl}"], null ]
+				] ]
+			] ],
+		]);
+
+		$featureTypeNodes = [];
+		foreach ($this->_getTableAclList() as $tblAcl) {
+			$dataSourceName = 'default_db';// TODO: $tblAcl->getSourceName()
+			$prefix = "p5_{$dataSourceName}";
+			$featureTypeNodes[] = [ 'FeatureType', [ "xmlns:{$prefix}" => Api_WfsNs::getNsUri($prefix) ], [
+				[ 'Name', $prefix . ':' . $tblAcl->getName() ],
+				[ 'Title', $tblAcl->getRawLabel() ],
+				[ 'Abstract', $tblAcl->getRawOpis() ],
+				[ 'Keywords', implode(', ', [ $tblAcl->getID(), $tblAcl->getName(), $tblAcl->getRawLabel() ]) ],
+				[ 'SRS', 'EPSG:4326' ],
+				[ 'LatLongBoundingBox', [
+					'minx' => "8.12328509871721",
+					'miny' => "38.8575126897477",
+					'maxx' => "9.838674658246807",
+					'maxy' => "41.31378404137082"], null ]
+			]];
+		}
+		foreach (Core_AclHelper::getAclList() as $typeName) {
+			list($prefix, $name) = explode(':', $typeName);
+			$featureTypeNodes[] = [ 'FeatureType', [ "xmlns:{$prefix}" => Api_WfsNs::getNsUri($prefix) ], [
+				[ 'Name', $name ],
+				[ 'Title', $name ],
+				[ 'Abstract', $name ],
+				[ 'Keywords', $name ],
+				[ 'SRS', 'EPSG:4326' ],
+			]];
+		}
+		$xmlWriter->startElement('FeatureTypeList');
+		$xmlWriter->h('Operations', ['Query', 'Insert', 'Update', 'Delete', 'Lock']);
+		foreach ($featureTypeNodes as $node) {
+			$xmlWriter->h($node);
+		}
+		$xmlWriter->endElement();// FeatureTypeList
+
+		$xmlWriter->h('ogc:Filter_Capabilities', [
+			[ 'ogc:Spatial_Capabilities', [
+				[ 'ogc:Spatial_Operators', [
+					'ogc:Disjoint',
+					'ogc:Equals',
+					'ogc:DWithin',
+					'ogc:Beyond',
+					'ogc:Intersect',
+					'ogc:Touches',
+					'ogc:Crosses',
+					'ogc:Within',
+					'ogc:Contains',
+					'ogc:Overlaps',
+					'ogc:BBOX',
+				] ]
+			] ],
+			[ 'ogc:Scalar_Capabilities', [
+				'ogc:Logical_Operators',
+				[ 'ogc:Comparison_Operators', [
+					'ogc:Simple_Comparisons',
+					'ogc:Between',
+					'ogc:Like',
+					'ogc:NullCheck',
+				] ],
+				[ 'ogc:Arithmetic_Operators', [
+					'ogc:Simple_Arithmetic',
+					[ 'ogc:Functions', [
+						[ 'ogc:Function_Names', [
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "abs" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "abs_2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "abs_3" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "abs_4" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "acos" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "AddCoverages" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "Aggregate" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Area" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "area2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "AreaGrid" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "asin" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "atan" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "atan2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"14"], "BarnesSurface" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "between" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "boundary" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "boundaryDimension" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Bounds" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "buffer" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "BufferFeatureCollection" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "bufferWithSegments" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"7"], "Categorize" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "ceil" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Centroid" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "classify" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "Clip" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "CollectGeometries" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Average" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Bounds" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"0"], "Collection_Count" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Max" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Median" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Min" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Sum" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Collection_Unique" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Concatenate" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "contains" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"7"], "Contour" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "convert" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "convexHull" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "cos" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "Count" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "CropCoverage" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "crosses" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "dateFormat" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "dateParse" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "difference" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "dimension" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "disjoint" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "disjoint3D" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "distance" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "distance3D" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "double2bool" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "endAngle" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "endPoint" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "env" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "envelope" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "EqualInterval" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "equalsExact" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "equalsExactTolerance" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "equalTo" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "exp" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "exteriorRing" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Feature" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "floor" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "geometryType" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "geomFromWKT" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "geomLength" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "getGeometryN" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "getX" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "getY" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "getz" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "greaterEqualThan" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "greaterThan" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "Grid" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"7"], "Heatmap" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"0"], "id" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "IEEEremainder" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "if_then_else" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"11"], "in10" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "in2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "in3" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "in4" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"6"], "in5" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"7"], "in6" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"8"], "in7" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"9"], "in8" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"10"], "in9" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "InclusionFeatureCollection" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "int2bbool" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "int2ddouble" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "interiorPoint" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "interiorRingN" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Interpolate" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "intersection" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"7"], "IntersectionFeatureCollection" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "intersects" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "intersects3D" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "isClosed" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"0"], "isCoverage" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "isEmpty" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "isLike" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "isNull" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "isometric" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "isRing" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "isSimple" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "isValid" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "isWithinDistance" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "isWithinDistance3D" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "Jenks" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "length" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "lessEqualThan" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "lessThan" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "list" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "log" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "LRSGeocode" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "LRSMeasure" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "LRSSegment" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "max" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "max_2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "max_3" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "max_4" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "min" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "min_2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "min_3" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "min_4" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "mincircle" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "minimumdiameter" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "minrectangle" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "modulo" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "MultiplyCoverages" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Nearest" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "not" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "notEqualTo" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "numberFormat" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "numberFormat2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "numGeometries" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "numInteriorRing" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "numPoints" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "octagonalenvelope" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "offset" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "overlaps" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "parameter" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "parseBoolean" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "parseDouble" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "parseInt" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "parseLong" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"0"], "pi" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "PointBuffers" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "pointN" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"7"], "PointStacker" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"6"], "PolygonExtraction" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "pow" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "property" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "PropertyExists" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "Quantile" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Query" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"0"], "random" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "RangeLookup" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "RasterAsPointCollection" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "RasterZonalStatistics" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"5"], "Recode" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "RectangularClip" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "relate" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "relatePattern" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Reproject" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "rint" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "round" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "round_2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "roundDouble" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"6"], "ScaleCoverage" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "sdo_nn" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "setCRS" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Simplify" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "sin" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "Snap" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "sqrt" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "StandardDeviation" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "startAngle" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "startPoint" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "strCapitalize" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strConcat" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strEndsWith" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strEqualsIgnoreCase" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strIndexOf" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strLastIndexOf" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "strLength" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strMatches" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "strPosition" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"4"], "strReplace" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strStartsWith" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "strSubstring" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "strSubstringStart" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "strToLowerCase" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "strToUpperCase" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "strTrim" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "strTrim2" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "StyleCoverage" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "symDifference" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "tan" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "toDegrees" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "toRadians" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "touches" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "toWKT" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "Transform" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "union" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "UnionFeatureCollection" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "Unique" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "UniqueInterval" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"6"], "VectorToRaster" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"3"], "VectorZonalStatistics" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"1"], "vertices" ],
+							[ 'ogc:Function_Name', ['nArgs'=>"2"], "within" ],
+						] ],
+					] ],
+				] ],
+			] ],
+		]);
+		$xmlWriter->endElement();// WFS_Capabilities
+		$xmlWriter->endDocument();
 		exit;
 	}
 
@@ -471,199 +584,6 @@ class Api_WfsServerBase {
 		return $usrObjList;
 	}
 
-	public function _printGetCapabilitiesXml($wfsServerUrl) {
-		?>
-			<GetCapabilities>
-				<DCPType>
-					<HTTP>
-						<Get onlineResource="<?php echo $wfsServerUrl; ?>?REQUEST=GetCapabilities" />
-					</HTTP>
-				</DCPType>
-				<DCPType>
-					<HTTP>
-						<Post onlineResource="<?php echo $wfsServerUrl; ?>" />
-					</HTTP>
-				</DCPType>
-			</GetCapabilities>
-		<?php
-	}
-
-	public function _printDescribeFeatureTypeXml($wfsServerUrl) {
-		?>
-			<DescribeFeatureType>
-				<SchemaDescriptionLanguage>
-					<XMLSCHEMA />
-				</SchemaDescriptionLanguage>
-				<DCPType>
-					<HTTP>
-						<Get onlineResource="<?php echo $wfsServerUrl; ?>?REQUEST=DescribeFeatureType" />
-					</HTTP>
-				</DCPType>
-				<DCPType>
-					<HTTP>
-						<Post onlineResource="<?php echo $wfsServerUrl; ?>" />
-					</HTTP>
-				</DCPType>
-			</DescribeFeatureType>
-		<?php
-	}
-
-	public function _printGetFeatureXml($wfsServerUrl) {
-		?>
-			<GetFeature>
-				<ResultFormat>
-					<WFSKMLOutputFormat />
-					<GML2 />
-					<GML3 />
-					<SHAPE-ZIP />
-					<CSV />
-					<JSON />
-				</ResultFormat>
-				<DCPType>
-					<HTTP>
-						<Get onlineResource="<?php echo $wfsServerUrl; ?>?REQUEST=GetFeature" />
-					</HTTP>
-				</DCPType>
-				<DCPType>
-					<HTTP>
-						<Post onlineResource="<?php echo $wfsServerUrl; ?>" />
-					</HTTP>
-				</DCPType>
-			</GetFeature>
-		<?php
-	}
-
-	public function _printTransactionXml($wfsServerUrl) {
-		?>
-			<Transaction>
-				<DCPType>
-					<HTTP>
-						<Get onlineResource="<?php echo $wfsServerUrl; ?>?request=Transaction" />
-					</HTTP>
-				</DCPType>
-				<DCPType>
-					<HTTP>
-						<Post onlineResource="<?php echo $wfsServerUrl; ?>" />
-					</HTTP>
-				</DCPType>
-			</Transaction>
-		<?php
-	}
-
-	public function _printLockFeatureXml($wfsServerUrl) {
-		?>
-			<LockFeature>
-				<DCPType>
-					<HTTP>
-						<Get onlineResource="<?php echo $wfsServerUrl; ?>?REQUEST=LockFeature" />
-					</HTTP>
-				</DCPType>
-				<DCPType>
-					<HTTP>
-						<Post onlineResource="<?php echo $wfsServerUrl; ?>" />
-					</HTTP>
-				</DCPType>
-			</LockFeature>
-		<?php
-	}
-
-	public function _printGetFeatureWithLockXml($wfsServerUrl) {
-		?>
-			<GetFeatureWithLock>
-				<ResultFormat>
-					<GML2 />
-				</ResultFormat>
-				<DCPType>
-					<HTTP>
-						<Get onlineResource="<?php echo $wfsServerUrl; ?>?REQUEST=GetFeatureWithLock" />
-					</HTTP>
-				</DCPType>
-				<DCPType>
-					<HTTP>
-						<Post onlineResource="<?php echo $wfsServerUrl; ?>" />
-					</HTTP>
-				</DCPType>
-			</GetFeatureWithLock>
-		<?php
-	}
-
-	public function _printFeatureTypeListXml() {
-		$featureTypes = array();
-		foreach ($this->_getTableAclList() as $tblAcl) {
-			$dataSourceName = 'default_db';// TODO: getSourceName
-			$tblName = $tblAcl->getName();
-			$usrObjList[] = array($dataSourceName, $tblName);
-			$featureType = array();
-			$featureType['ns'] = "p5_{$dataSourceName}";
-			$featureType['Name'] = $tblAcl->getName();
-			$featureType['Title'] = $tblAcl->getRawLabel();
-			$featureType['Abstract'] = $tblAcl->getRawOpis();
-			$featureType['Keywords'] = array();
-			$featureType['Keywords'][] = $tblAcl->getID();
-			$featureType['Keywords'][] = $tblName;
-			$featureType['Keywords'][] = $tblAcl->getRawLabel();
-			$featureType['Keywords'] = implode(", ", $featureType['Keywords']);
-			$featureType['SRS'] = "EPSG:4326";
-			$featureType['LatLongBoundingBox'] = array();// TODO: feature LatLongBoundingBox
-			$featureType['LatLongBoundingBox']['minx'] = "8.12328509871721";
-			$featureType['LatLongBoundingBox']['miny'] = "38.8575126897477";
-			$featureType['LatLongBoundingBox']['maxx'] = "9.838674658246807";
-			$featureType['LatLongBoundingBox']['maxy'] = "41.31378404137082";
-			$featureTypes[] = $featureType;
-		}
-
-		foreach (Core_AclHelper::getAclList() as $typeName) {
-			$exTypeName = explode(':', $typeName);
-			$featureType = array();
-			$featureType['ns'] = $exTypeName[0];
-			$featureType['Name'] = $exTypeName[1];
-			$featureType['Title'] = $exTypeName[1];
-			$featureType['Abstract'] = $exTypeName[1];
-			$featureType['Keywords'] = $exTypeName[1];
-			$featureType['SRS'] = "EPSG:4326";
-			$featureTypes[] = $featureType;
-		}
-
-		/*
-			<FeatureType>
-				<Name>ppr06:AMBITIPAESAGGIO</Name>
-				<Title>AMBITIPAESAGGIO</Title>
-				<Abstract />
-				<Keywords>features, AMBITIPAESAGGIO</Keywords>
-				<SRS>EPSG:4326</SRS>
-				<LatLongBoundingBox minx="8.12328509871721" miny="38.8575126897477" maxx="9.838674658246807" maxy="41.31378404137082" />
-			</FeatureType>
-		*/
-		$featureTypesXml = '';
-		foreach ($featureTypes as $feature) {
-			$nsUriFeature = Api_WfsNs::getNsUri($feature['ns']);
-			$featureTypesXml .= "    " . '<FeatureType xmlns:' . $feature['ns'] . '="' . $nsUriFeature . '">' . "\n";
-				$featureTypesXml .= "      " . '<Name>' . "{$feature['ns']}:{$feature['Name']}" . '</Name>' . "\n";
-				$featureTypesXml .= "      " . '<Title>' . "{$feature['Title']}" . '</Title>' . "\n";
-				if (!empty($feature['Abstract'])) {
-					$featureTypesXml .= "      " . '<Abstract>' . "{$feature['Abstract']}" . '</Abstract>' . "\n";
-				} else {
-					$featureTypesXml .= "      " . '<Abstract/>' . "\n";
-				}
-				if (!empty($feature['Keywords'])) {
-					$featureTypesXml .= "      " . '<Keywords>' . "{$feature['Keywords']}" . '</Keywords>' . "\n";
-				} else {
-					$featureTypesXml .= "      " . '<Keywords/>' . "\n";
-				}
-				$featureTypesXml .= "      " . '<SRS>' . "{$feature['SRS']}" . '</SRS>' . "\n";
-				if (!empty($feature['LatLongBoundingBox'])) {
-					$latLongBoundingBoxOut = array();
-					$latLongBoundingBoxOut[] = 'minx="' . $feature['LatLongBoundingBox']['minx'] . '"';
-					$latLongBoundingBoxOut[] = 'miny="' . $feature['LatLongBoundingBox']['miny'] . '"';
-					$latLongBoundingBoxOut[] = 'maxx="' . $feature['LatLongBoundingBox']['maxx'] . '"';
-					$latLongBoundingBoxOut[] = 'maxy="' . $feature['LatLongBoundingBox']['maxy'] . '"';
-					$featureTypesXml .= "      " . '<LatLongBoundingBox ' . implode(' ', $latLongBoundingBoxOut) . ' />' . "\n";
-				}
-			$featureTypesXml .= "    " . '</FeatureType>' . "\n";
-		}
-		echo $featureTypesXml;
-	}
-
 	public function _parseTransactionXmlStruct($requestXml, $requestXmlTags) {
 		$DBG = V::get('DBG_XML', 0, $_GET, 'int');// TODO: Profiler
 		$rootTagName = V::get('tag', '', $requestXmlTags[0]);
@@ -1359,7 +1279,6 @@ if($DBG){echo 'L.' . __LINE__ . ' $validateConvertedTransactionXsdString:';print
 			$tblName = $tblAcl->getName();
 			$typeNames[] = array("p5_{$dataSourceName}", $tblName);
 		}
-		// $typeNames[] = array("p5_objects", 'File');// @see $this->_printFeatureTypeListXml - all types
 		return $this->_getDescribeFeatureTypes($typeNames, $simple);
 	}