[geotk] WPS client example

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Mon Jan 27 06:36:52 PST 2014


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20140127/037e9a93/attachment.html>


More information about the Geotoolkit mailing list