Open emxsys opened 6 years ago
Here is the XML for exporting a GeoPackage. Note the embedded colon chars in the layers and srs tags.
<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>gs:GeoPackage</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>contents</ows:Identifier>
<wps:Data>
<wps:ComplexData mimeType="text/xml; subtype=geoserver/geopackage">
<geopackage xmlns="http://www.opengis.net/gpkg" name="world">
<tiles name="world">
<layers>test:world</layers>
<styles>raster</styles>
<transparent>false</transparent>
<bbox>
<minx>-180.0</minx>
<miny>-90.0</miny>
<maxx>180.0</maxx>
<maxy>90.0</maxy>
</bbox>
<srs>EPSG:4326</srs>
<coverage>
<minZoom>0</minZoom>
<maxZoom>8</maxZoom>
</coverage>
</tiles>
</geopackage>
</wps:ComplexData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:RawDataOutput>
<ows:Identifier>geopackage</ows:Identifier>
</wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>
GeoPackageProcessRequestPPIO.decode
receives the following input (note the ":" in the end-tags after the layers tag.
input = (java.lang.String) "<geopackage name="world" xmlns:wfs='http://www.opengis.net/wfs' xmlns:xml='http://www.w3.org/XML/1998/namespace' xmlns:wcs='http://www.opengis.net/wcs/1.1.1' xmlns:gml='http://www.opengis.net/gml' xmlns:ows='http://www.opengis.net/ows/1.1' xmlns:ogc='http://www.opengis.net/ogc' xmlns:wps='http://www.opengis.net/wps/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xlink='http://www.w3.org/1999/xlink'>
<tiles name="world">
<layers>test:world</:layers>
<styles>raster</:styles>
<transparent>false</:transparent>
<bbox>
<minx>-180.0</:minx>
<miny>-90.0</:miny>
<maxx>180.0</:maxx>
<maxy>90.0</:maxy>
</:bbox>
<srs>EPSG:4326</:srs>
<coverage>
<minZoom>0</:minZoom>
<maxZoom>8</:maxZoom>
</:coverage>
</:tile...
Upon further review, the it seems all the closing end-tags have an embedded colon. In a debugging hack, i simply replaced the </:
string with </
in GeoPackageProcessRequestPPIO.decode
and that allows the export process to proceed, only to generate this error:
gs:GeoPackageGeoPackageGeopackage ProcessFailed to retrieve value for input contents
Errors were encountered while parsing GeoPackage contents:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 422;
cvc-elt.1: Cannot find the declaration of element 'geopackage'.]
I would appear the entity resolver registered in applicationContext.xml
cannot be found or was not loaded.
After the upgrade to GeoServer 2.13, the export GeoPackage process generates a valid XML, but somewhere in the process, the XML end-tags end up with ":" chars injected into the end-tags. For example:
<layers>...</:layers>
Error text: