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

Kristof Lange kristof.lange at uni-muenster.de
Wed Aug 25 03:25:50 PDT 2010


Hi again,

i tried my Post-client with the fixed request, but I did an internal 
server error with the given endpoint:

here the request again, perhaps there is an very good hidden mistake in it:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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://dreal-official.geolabs.fr/mapjax/webservices/wfs/dreal_lr_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 storeExecuteResponse="false">
                         <wps:Output asReference="true">
                         <ows:Identifier>BufferedPolygon</ows:Identifier>
                         </wps:Output>
                 </wps:ResponseDocument>
         </wps:ResponseForm>
</wps:Execute>

or are the other instances of the zoo-wps, where I could test the request?
Any advise would be great!

best regards
Kristof Lange

Gérald Fenoy wrote:
> 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 
> <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 
>> <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 
>> <mailto: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 <mailto: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
> 




More information about the Zoo-discuss mailing list