[PyWPS-dev] XML parser for Docker container

Carsten Ehbrecht ehbrecht at dkrz.de
Mon Sep 3 02:03:57 PDT 2018


Hi Adam,

I haven’t checked this. Could you please open a ticket on Github? In my processes I always return Complex outputs as reference, so I have probably avoid these issues. 

Cheers,
Carsten

> On 10. Aug 2018, at 12:37, Adam Laža <ad.laza32 at gmail.com> wrote:
> 
> Hi devs,
> 
> I have a problem with xml parsing when using alpine/flask Dockerfile [1] (the only minor change is upgraded Xerces version to 3.2.1 and added curl package to apk). After building and starting a container I tried to send sample POST request using curl from within the running container (I checked the xml and it's well-formated):
> 
> curl -d pywps-flask/static/requests/execute_buffer_post.xml localhost:5000/wps
> 
> but I got ExceptionError:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- PyWPS 4.0.0 -->
> <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1 <http://www.opengis.net/ows/1.1>" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>" xsi:schemaLocation="http://www.opengis.net/ows/1.1 <http://www.opengis.net/ows/1.1> http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd <http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd>" version="1.0.0">
>   <ows:Exception exceptionCode="NoApplicableCode" locator="" >
>       <ows:ExceptionText>Start tag expected, '<' not found, line 1, column 1</ows:ExceptionText>
>   </ows:Exception>
> </ows:ExceptionReport>
> 
> 
> 
> I also tried to use OWSLib to send the request and I get the result code but the output in response is not well-formated:
> 
>         <wps:Output>
>             <ows:Identifier>buff_out</ows:Identifier>
>             <ows:Title>Buffered file</ows:Title>
>             <ows:Abstract></ows:Abstract>
>             <wps:Data>
>                 <wps:ComplexData mimeType="application/gml+xml" encoding="" schema="">
>                     <![CDATA[
>                             <ogr:FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&#34 <http://www.w3.org/2001/XMLSchema-instance&#34>; xmlns:ogr="http://ogr.maptools.org/&#34 <http://ogr.maptools.org/&#34>; xmlns:gml="http://www.opengis.net/gml&#34 <http://www.opengis.net/gml&#34>; xsi:schemaLocation="                            http://schemas.opengis.net/gml/2.1.2/feature.xsd"&gt <http://schemas.opengis.net/gml/2.1.2/feature.xsd"&gt>;
>   <gml:boundedBy>
>     <gml:Box>
>       <gml:coord><gml:X>-0.9514645979959721</gml:X><gml:Y>-0.986306232731747</gml:Y></gml:coord>
>       <gml:coord><gml:X>1.048535402004028</gml:X><gml:Y>1.013693767268253</gml:Y></gml:coord>
>     </gml:Box>
>   </gml:boundedBy>
>                                                                                              
>   <gml:featureMember>
>     <ogr:point_buffer fid="point_buffer.0">
>       <ogr:geometryProperty><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1.04853540200403,0.013693767268253 1.0471649367586,-0.038642188974691 1.0430572973723,-0.0908346959994 11.03622374259917,0.170128232308481 1.0430572973723,0.118222230535904 1.0471649367586,0.066029723511194 1.04853540200403,0.013693767268253</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
>     </ogr:point_buffer>
>   </gml:featureMember>
> </ogr:FeatureCollection>
> 
>                     ]]>
>                 </wps:ComplexData>
>             </wps:Data>
>         </wps:Output>
> 
> Any idea what could be wrong? I hadn't this problem before. It started after I built a new Docker image (but from the same Dockerfile). I suspect expat or xerces but not really sure what I should be looking for.
> 
> Cheers,
> Adam
> 
> 
> [1]: https://github.com/geopython/pywps-flask/blob/master/docker/alpine/flask/Dockerfile <https://github.com/geopython/pywps-flask/blob/master/docker/alpine/flask/Dockerfile>
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pywps-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20180903/292a5e41/attachment-0001.html>


More information about the pywps-dev mailing list