[geotk] WPS client example

Emmanuel Blondel emmanuel.blondel1 at gmail.com
Mon Feb 3 02:07:01 PST 2014


Hello,

So i've tried the WPS client (4.x-SNAPSHOT), with the following code:

         final URL wpsURL = new 
URL("http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService");
         final WebProcessingServer wpsClient = new 
WebProcessingServer(wpsURL, WebProcessingServer.WPSVersion.v100.getCode());

         // Once initialized, we can ask a description of wanted 
process, using its id.
         for(ProcessDescriptor process : wpsClient.getDescriptors()){
             Logger.info(process.getIdentifier().getCode());
         }



Here the stacktrace i obtain:

Infos: GetCapabilities request succeed.
févr. 03, 2014 11:03:26 AM org.geotoolkit.wps.WebProcessingServer <init>
Infos: Web processing client initialization complete.
Exception in thread "main" java.util.ServiceConfigurationError: 
javax.imageio.spi.ImageReaderSpi: Provider 
org.geotoolkit.coverage.wkb.WKBRasterImageReader$Spi could not be 
instantiated: java.lang.NoSuchFieldError: VERSION
     at java.util.ServiceLoader.fail(ServiceLoader.java:224)
     at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
     at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
     at 
javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:210)
     at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
     at 
javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
     at javax.imageio.ImageIO.<clinit>(ImageIO.java:65)
     at org.geotoolkit.wps.io.WPSIO.<clinit>(WPSIO.java:106)
     at 
org.geotoolkit.wps.WebProcessingServer.requestDescriptors(WebProcessingServer.java:518)
     at 
org.geotoolkit.wps.WebProcessingServer.checkDescriptors(WebProcessingServer.java:426)
     at 
org.geotoolkit.wps.WebProcessingServer.getDescriptors(WebProcessingServer.java:401)
/    at org.fao.fi.gis.intersections.WPSExecutor.main(WPSExecutor.java:113)/
Caused by: java.lang.NoSuchFieldError: VERSION
     at 
org.geotoolkit.coverage.wkb.WKBRasterImageReader$Spi.<init>(WKBRasterImageReader.java:108)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
     at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     at java.lang.Class.newInstance(Class.java:374)
     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
     ... 10 more


Le 30/01/2014 10:56, Martin Desruisseaux a écrit :
> Hello Emmanuel
>
> Le 30/01/14 10:26, Emmanuel Blondel a écrit :
>> So, which version should i use for testing this? 4-0-SNAPSHOT?
>
> Yes, 4.0-SNAPSHOT should work. Please let us know if you have any issue.
>
>     Martin
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20140203/77b30e5b/attachment.html>


More information about the Geotoolkit mailing list