[Zoo-discuss] POST not implemented

Fenoy Gerald gerald.fenoy at geolabs.fr
Wed Aug 13 10:54:40 PDT 2014


Dear Pablo,
sorry for answering so late to your email.

The issue should be fixed with revision 498 [1], so I would like to invite you to try upgrading your setup and try to run the same request again then report here your result.

Please, also note that when you provide the InputPolygon using the GetFeature request then the value used will be a FeatureCollection not a FeatureMember as you used in the xml request your provided in the previous email. So, I think that you should also review your initial request.

I hope this help you to solve your problem and we will hear back from you,
Best regards,

[1] http://zoo-project.org/trac/changeset/498

Le 9 août 2014 à 02:22, pablo zader <pzader at gmail.com> a écrit :

> Thanks Fenoy,
> 
> I did the update my version from the trunk and now I have: revision 496 
> The query GET work well!!! The query POST not func.
> 
> But now I get another error:
> 
> "<?xml version="1.0" encoding="UTF-8"?>
> <ExceptionReport xmlns="
> http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd
> " xml:lang="en-US" version="1.1.0">
>   <Exception exceptionCode="InternalError">
>     <ExceptionText>ZOO Kernel failed to process your request receiving signal 11 = SIGSEGV</ExceptionText>
>   </Exception>
> </ExceptionReport>
> "
> 
> 
> I try also through the command line and the same error:
> 
> ~/shapes/prueba-wps$ curl -H "Content-Type: application/xml" -d@/home/pablo/shapes/prueba-wps/query_v_split.xml "http://localhost/cgi-bin/zoo_loader.cgi"
> <?xml version="1.0" encoding="UTF-8"?>
> <ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0">
>   <Exception exceptionCode="InternalError">
>     <ExceptionText>ZOO Kernel failed to process your request receiving signal 11 = SIGSEGV</ExceptionText>
>   </Exception>
> </ExceptionReport>
> 
> My main.cfg:
> 
> [main] 
> encoding=utf-8 
> isTrial=true 
> dataPath=/var/www/data 
> tmpPath=/var/www/tmp 
> cacheDir=/var/www/cache 
> rootUrl=/var/www/ 
> version=1.0.0 
> applicationAddress=http://127.0.0.1 
> msOgcVersion=1.0.0 
> serverAddress=http://127.0.0.1/zoo 
> lang=fr-FR,en-US,ja-JP 
> tmpUrl=../tmp 
> 
> 
> Could my query is malformed? (query EXECUTE through POST)
> 
> You can provide me a zoo-kernel to test my query POST? or someone could try my query POST with your own installation of zoo-project please? Attach the query EXECUTE POST (process v_split).
> 
> Other question: 
> Is there any resource (tools online, any script, etc.) to automatically generate queries WPS POST type?
> 
> Thanks in advanced
> 
> Pablo
> 
> 
> 
> 2014-08-02 12:33 GMT-03:00 Fenoy Gerald <gerald.fenoy at geolabs.fr>:
> Dear Pablo,
> I would like to know what is the ZOO-Kernel version you are currently using ?
> Indeed it sounds strange that switching from GET to POST change so much thing. In other case, this have to be review and fixed asap.
> So, I would like to invite you to build the ZOO-Kernel from the SVN trunk source tree and try the same requests against this version and report any issue if you have still one.
> 
> I hope to hear back from you,
> 
> Best regards,
> 
> Le 30 juil. 2014 à 18:24, pablo zader <pzader at gmail.com> a écrit :
> 
> > Thanks Fenoy
> >
> > I am now using as input appliaction/xml instead of text/xml and it works!! (through POST . attach in this mail). But I have another error (attach the log file zoo_proyect):
> >
> > TRACE : GDLA error while import. Unable to create input location from input /tmp/tmphfAPH3/input_0 GDAL log: ERROR: Unable to open data source </tmp/tmphfAPH3/input_0><class 'gms.ErrorHandler.GMSError'>Unable to run your python process properly. Please check the following messages : [' File "/usr/lib/cgi-bin/v_buffer.py", line 7, in v_buffer\n service.fromMaps("v.buffer", inputs, outputs)\n', ' File "/usr/lib/cgi-bin/ZOOGrassModuleStarter.py", line 77, in fromMaps\n self._importData()\n', ' File "/usr/lib/cgi-bin/gms/GrassModuleStarter.py", line 469, in _importData\n self._createInputLocation(input)\n', ' File "/usr/lib/cgi-bin/gms/GrassModuleStarter.py", line 568, in _createInputLocation\n raise GMSError(log)\n']
> >
> > But making a GET request works well:
> >
> > http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=v_buffer&DataInputs=input=Reference@xlink:href=http%3A%2F%2Flocalhost%2Fcgi-bin%2Fmapserv%3Fmap%3D%2Fvar%2Fwww%2Fmapfile%2Fwfs.map%26SERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dfeature%3Acontinent%26SRS%3DEPSG%3A4326%26FeatureID%3Dcontinent.1;distance=10&RawDataOutput=output@mimeType=application/xml
> >
> > Another test was made ​​using cURL where the file demo1.xml  containing the above information request POST:
> >
> > curl -H "Content-Type: application/xml" -d@/home/pablo/Descargas/demo1.xml "http://localhost/cgi-bin/zoo_loader.cgi"
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0">
> >   <Exception exceptionCode="NoApplicableCode">
> >     <ExceptionText>TRACE : GDLA error while import. Unable to create input location from input /tmp/tmpitl1aH/input_0 GDAL log: ERROR: Unable to open data source </tmp/tmpitl1aH/input_0>
> >
> > <class 'gms.ErrorHandler.GMSError'>
> > Unable to run your python process properly. Please check the following messages : ['  File "/usr/lib/cgi-bin/v_buffer.py", line 7, in v_buffer\n    service.fromMaps("v.buffer", inputs, outputs)\n', '  File "/usr/lib/cgi-bin/ZOOGrassModuleStarter.py", line 77, in fromMaps\n    self._importData()\n', '  File "/usr/lib/cgi-bin/gms/GrassModuleStarter.py", line 469, in _importData\n    self._createInputLocation(input)\n', '  File "/usr/lib/cgi-bin/gms/GrassModuleStarter.py", line 568, in _createInputLocation\n    raise GMSError(log)\n']</ExceptionText>
> >   </Exception>
> > </ExceptionReport>
> >
> > Note:
> > The get request was made on a vector taken with WFS
> > The POST request is on a user-selected feature from the map.
> >
> >
> > Thanks in advanced
> >
> > Pablo
> >
> >
> >
> > 2014-07-28 12:17 GMT-03:00 Fenoy Gerald <gerald.fenoy at geolabs.fr>:
> > Dear Pablo,
> > thanks for providing your XML request.
> >
> > From my point of view, there is an issue in the request you provided, you defined the mimeType attribute of your ComplexeData node to « text/xml » which is valid, but then, rather than providing a XML node in the request, you provided a CDATA node which should be used for ComplexData with the mimeType defined to application/json for instance.
> >
> > In the case of mimeType defined to text/xml, the ZOO-Kernel is searching for a XML node which will be used as a root of a new document which will then be used to POST the request to the targeted server.
> >
> > So your request should work by removing both: «  <![CDATA[ » and « ]]> » from its content.
> >
> > If anybody think that it is wrong to handle the text/xml content the way ZOO-Project is doing, then please speak up and let me know.
> > I wonder, cause it is not the first time that somebody send such kind of requests. The issue Steve faced with his request was really similar to this one.
> >
> > We may fix the issue directly in the Client code maybe ?
> >
> > Waiting for your answer,
> > Best regards,
> >
> >
> > Le 28 juil. 2014 à 16:27, pablo zader <pzader at gmail.com> a écrit :
> >
> > > Hi list,
> > > I'm developing a client wps modifying the example WPSDemo.js from
> > > http://suite.opengeo.org/4.1/processing/wpsclient/index.html .
> > > I'm using zoo-proyect as wps server.
> > > I'm trying to invoke the buffer process implemented in GRASS GIS gives me the following error:
> > >
> > > POST http://localhost:9080/proxy/?url=http%3A%2F%2Flocalhost%2Fcgi-bin%2Fzoo_loader.cgi%3F 501 (Not Implemented)
> > >
> > > The query POST is:
> > >
> > > <wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">v_buffer</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">input</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Or data source for direct OGR access</ows:Title><wps:Data><wps:ComplexData mimeType="text/xml"><![CDATA[<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMember xmlns:gml="http://www.opengis.net/gml"><feature:features xmlns:feature="http://mapserver.gis.umn.edu/mapserver" fid="OpenLayers_Feature_Vector_248"><feature:geometry><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">-6383273.5489707,1396657.4552779 -4230806.8327598,26905.908598173 -6246298.3943028,-442723.19312058 -6383273.5489707,1396657.4552779</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></feature:geometry></feature:features></gml:featureMember></wfs:FeatureCollection>]]></wps:ComplexData></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">layer</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">A single vector map can be connected to multiple database tables. This number determines which table to use. When used with direct OGR access this is the layer name.</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">cats</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Example: 1,3,7-9,13</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">where</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Example: income  1000 and inhab :: 10000</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">type</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Feature type</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">distance</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Buffer distance along major axis in map units</ows:Title><wps:Data><wps:LiteralData>195678.7923828125</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">minordistance</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Buffer distance along minor axis in map units</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">angle</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Angle of major axis in degrees</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">bufcolumn</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Name of column to use for buffer distances</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">scale</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Scaling factor for attribute column values</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">tolerance</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Maximum distance between theoretical arc and polygon segments as multiple of buffer</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">-s</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Make outside corners straight</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">-c</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Dont make caps at the ends of polylines</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input><wps:Input><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">-t</ows:Identifier><ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Transfer categories and attributes</ows:Title><wps:Data><wps:LiteralData/></wps:Data></wps:Input></wps:DataInputs><wps:ResponseForm><wps:RawDataOutput mimeType="text/xml"><ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">output</ows:Identifier></wps:RawDataOutput></wps:ResponseForm></wps:Execute>
> > >
> > > Thanks in advanced
> > >
> > > P.
> > >
> > > _______________________________________________
> > > Zoo-discuss mailing list
> > > Zoo-discuss at lists.osgeo.org
> > > http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss
> >
> >
> >
> > Gérald Fenoy
> > http://wiki.osgeo.org/wiki/User:Djay
> >
> >
> >
> >
> > --
> > Pablo J. Zader
> > Lic. en Cs. de la Computación
> > CONAE
> > pablo.zader at gmail.com
> >
> > "Los Grandes Hombres hablan sobre ideas...
> >  Los Hombres Promedio hablan sobre cosas...
> >  Los Hombres Pequeños hablan.. de otros Hombres.
> >
> > del libro Matemática estas ahi? A. Paenza "
> > <log_zoo.txt><demo1.xml>
> 
> 
> 
> Gérald Fenoy
> http://wiki.osgeo.org/wiki/User:Djay
> 
> 
> 
> 
> -- 
> Pablo J. Zader
> Lic. en Cs. de la Computación
> CONAE 
> pablo.zader at gmail.com
> 
> "Los Grandes Hombres hablan sobre ideas...
>  Los Hombres Promedio hablan sobre cosas...
>  Los Hombres Pequeños hablan.. de otros Hombres.
> 
> del libro Matemática estas ahi? A. Paenza "
> <query_v_split.xml.zip>



Gérald Fenoy
http://wiki.osgeo.org/wiki/User:Djay

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20140813/f2b22ded/attachment.pgp>


More information about the Zoo-discuss mailing list