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

Kristof Lange kristof.lange at uni-muenster.de
Thu Aug 19 08:06:04 PDT 2010


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



More information about the Zoo-discuss mailing list