[geotk] WPS client example

Emmanuel Blondel emmanuel.blondel1 at gmail.com
Mon Jan 27 07:27:00 PST 2014


Humm... correction, what is working is getting the list of 
ProcessOfferings from GetCapabilities, but server.getDescriptors() gives 
null output
Same for getDescriptor(processId).

Le 27/01/2014 15:36, Martin Desruisseaux a écrit :
> Hello Emmanuel
>
> Le 27/01/14 14:42, Emmanuel Blondel a écrit :
>> I'm instantiating a WebProcessingServer with a 52 North WPS, using 
>> the constructor WebProcessingServer(url, versionString).Strangely, i 
>> get a exception (HTTP 403). In parallel, i've tried to use the 52 
>> North client library and this works. This let me think that there is 
>> no particular restriction server side, and i'm trying to understand 
>> what's wrong with my code. By chance, can anyone have some sample 
>> code how to configure the WPS client properly?
>
> Quentin provided me the following test code:
>
>     final URL url = new URL("http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService");
>     final WebProcessingServer server = new WebProcessingServer(url, WebProcessingServer.WPSVersion.v100.getCode());
>
>     System.out.println(server.getCapabilities());
>
>     final List<ProcessDescriptor> process = server.getDescriptors();
>     for (ProcessDescriptor proc : process) {
>          System.out.println(proc.getIdentifier().getCode());
>     }
>
>
> Alternatively, with security enabled:
>
>     final ClientSecurity security = new BasicAuthenticationSecurity("login","password");
>     final WebProcessingServer server = new WebProcessingServer(url, security, WebProcessingServer.WPSVersion.v100.getCode());
>
>
> However we are not sure that it is related with the 403 error. Could 
> you provide us with the tested URL and the stack trace if there is one?
>
>
>> PS: I want to use the Geotoolkit WPS client, because 52North WPS is 
>> based on Geotools (and so, it's not based on geoapi, but gt-opengis 
>> Geotools module...).
>
> Yes... Soon or later we will need to ask them to use GeoAPI or rename 
> their "org.opengis" packages... This namespace is owned by OGC and 
> there is a standard working group (SWG) for it.
>
>     Martin
>
>
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit


-- 
*Emmanuel Blondel*
GIS Consultant
Engineer in Agronomy & Environment

Geographic Information Systems
in Agronomy - Environment - Fisheries
Email: emmanuel.blondel1 at gmail.com - Emmanuel.Blondel at fao.org
View my LinkedIn profileView my LinkedIn profile 
<http://fr.linkedin.com/in/emmanuelblondel1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20140127/d0c79b82/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btn_in_20x15.png
Type: image/png
Size: 288 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20140127/d0c79b82/attachment.png>


More information about the Geotoolkit mailing list