Hi,

I just wrote a simple WPS Client with geotools library.
I used the code in the geotools website:

http://docs.geotools.org/latest/userguide/unsupported/wps.html

I only changed the URL for the WPS in GeServer :
http://localhost:8080/geoserver/ows?service=wps&version=1.0.0&request=GetCapabilities
Also, I changed the name of process to "gt:DoubleAddition".

I can connect to the server and see the list of available process.

But, I got the following error in WPSFactory:
Exception in thread "main" java.lang.NullPointerException
        at 
org.geotools.data.wps.WPSUtils.getLiteralTypeFromReference(WPSUtils.java:296)
        at org.geotools.data.wps.WPSUtils.createInputParamMap(WPSUtils.java:183)
        at 
org.geotools.data.wps.WPSFactory.buildValuesFromProcessDescriptionType(WPSFactory.java:81)
        at org.geotools.data.wps.WPSFactory.<init>(WPSFactory.java:68)
        at au.org.aurin.wps.WPSClient.getCapabilities(WPSClient.java:108)
        at au.org.aurin.wps.WPSClient.main(WPSClient.java:42)

After looking into WPSUtiles class I found out that problem is here:
if (literalData != null) {
                String reference = literalData.getDataType().getReference();
                type = getLiteralTypeFromReference(reference);
}

reference is null, so getLiteralTypeFromReference gives
java.lang.NullPointerException.

I checked the same code with 52N WPS, which works fine!
So, I investigate the  "literalData.getDataType()" structure.
I found two fields namely "reference" and "value" which are related to
what we want.

If I use WPS in Geoserver, the "reference" will be NULL, but "value"
will be "xs:double", which getReference() can not read it!!
However, If I use 52N WPS the "reference" will be "xs:double" and it works fine.

I wonder if anyone has any clue about that. Is it a compatibility problem?
Any help would be appreciated.

Best Regards,
Bahman Javadi

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to