[ZOO-Discuss] Post-Buffer-Request with Java-Client

Gérald Fenoy gerald.fenoy at geolabs.fr
Fri Aug 20 05:54:02 PDT 2010


Hi Kristof,
the request you used should work properly if and only if you get a valid InputPolygon. Indeed in the request you  mentioned in your mail, I see a reference  to an old WFS server which is no more available. For getting a similar feature you should now use the following url :  http://dreal-official.geolabs.fr/mapjax/webservices/wfs/dreal_lr_general/?VERSION=1.1.0&service=WFS&request=GetFeature&typename=Znieff1&maxfeatures=1 . Nevertheless I suppose that your query is more general than using this datasource or an other, so the answer is yes you should be able to use your java client to request the ZOO Kernel.

Hope it helps,
best regards,

Le 19 août 2010 à 17:06, Kristof Lange a écrit :

> Hi list,
> 
> I wonder if it is possible to send a simple buffer-request to the wps 
> server with my java post-client.
> Something like this:
> 
> URL url = new URL(targetURL);
>           URLConnection conn = url.openConnection();
>           conn.setDoOutput(true);
>           OutputStreamWriter wr = new 
> OutputStreamWriter(conn.getOutputStream());
>           wr.write(payload);
>     wr.flush()
> 
> where payload is this parsed xml-file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <wps:Execute service="WPS" version="1.0.0" 
> xmlns:wps="http://www.opengis.net/wps/1.0.0" 
> xmlns:ows="http://www.opengis.net/ows/1.1" 
> xmlns:xlink="http://www.w3.org/1999/xlink" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
> ../wpsExecute_request.xsd">
>       <ows:Identifier>Buffer</ows:Identifier>
>       <wps:DataInputs>
>               <wps:Input>
>                       <ows:Identifier>InputPolygon</ows:Identifier>
>                       <ows:Title>Playground area</ows:Title>
>                       <wps:Reference 
> xlink:href="http://carto.languedoc-roussillon.ecologie.gouv.fr/webservices/wfs/diren_general/?VERSION=1.1.0&service=WFS&request=GetFeature&typename=Znieff1&maxfeatures=1"/> 
> 
>               </wps:Input>
>               <wps:Input>
>                       <ows:Identifier>BufferDistance</ows:Identifier>
>                       <ows:Title>Distance which people will walk to get 
> to a playground.</ows:Title>
>                       <wps:Data>
>                               <wps:LiteralData>400</wps:LiteralData>
>                       </wps:Data>
>               </wps:Input>
>       </wps:DataInputs>
>       <wps:ResponseForm>
>               <wps:ResponseDocument>
>                       <ows:Identifier>BufferedPolygon</ows:Identifier>
>               </wps:ResponseDocument>
>       </wps:ResponseForm>
> </wps:Execute>
> 
> 
> 
> this is the endpoint I am using: http://zoo-project.org/zoosoo/
> Thanks for help
> 
> Kristof Lange
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at gisws.media.osaka-cu.ac.jp
> http://gisws.media.osaka-cu.ac.jp/mailman/listinfo/zoo-discuss

Gérald Fenoy
gerald.fenoy at geolabs.fr


GEOLABS
Siège social :
Futur Building I
1280, avenue des Platanes
34970 Lattes
Tél. fixe : 04 67 53 67 37
Tél. portable : 06 70 08 25 39

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20100820/5c2c2472/attachment.html>


More information about the Zoo-discuss mailing list