Parsing error on creating WPS factory at DecribeProcessRequest
--------------------------------------------------------------
Key: GEOT-2727
URL: http://jira.codehaus.org/browse/GEOT-2727
Project: GeoTools
Issue Type: Bug
Components: new modules
Affects Versions: 2.6-M2
Reporter: Matthias Lendholt
my first mail to geotools-developer
public static WPSFactory getWpsFactory(URL wpsUrl, String
processName)throws ServiceException, IOException {
WebProcessingService wps = new WebProcessingService(wpsUrl);
DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
descRequest.setIdentifier(processName);
DescribeProcessResponse descResponse = wps.issueRequest(descRequest);
ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
ProcessDescriptionType pdt = (ProcessDescriptionType)
processDesc.getProcessDescription().get(0);
return new WPSFactory(pdt, wpsUrl);
}
The code is copied from http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin
Calling this method with a valid url (pointing to a local wps) an a
processName results in row "DescribeProcessResponse descResponse =
wps.issueRequest(descRequest);" in this exception:
!MESSAGE FooBar: Parsing failed for LiteralData:
java.lang.RuntimeException: Unable to set property: AllowedValues for
eobject: {http://www.opengis.net/wps/1.0.0}LiteralInputType
!STACK 0
java.lang.RuntimeException: Parsing failed for LiteralData:
java.lang.RuntimeException: Unable to set property: AllowedValues for
eobject: {http://www.opengis.net/wps/1.0.0}LiteralInputType
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:158)
at
org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:216)
at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:182)
at
org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222)
at
org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:605)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.geotools.xml.Parser.parse(Parser.java:221)
at org.geotools.xml.Parser.parse(Parser.java:149)
at
org.geotools.data.wps.response.DescribeProcessResponse.<init>(DescribeProcessResponse.java:65)
at
org.geotools.data.wps.WPS1_0_0$InternalDescribeProcessRequest.createResponse(WPS1_0_0.java:133)
at
org.geotools.data.ows.AbstractWPS.internalIssueRequest(AbstractWPS.java:417)
at
org.geotools.data.wps.WebProcessingService.issueRequest(WebProcessingService.java:233)
at
..... 20 more in my code .....
Caused by: java.lang.RuntimeException: Unable to set property:
AllowedValues for eobject:
{http://www.opengis.net/wps/1.0.0}LiteralInputType
at
org.geotools.xml.AbstractComplexEMFBinding.setProperty(AbstractComplexEMFBinding.java:284)
at
org.geotools.xml.AbstractComplexEMFBinding.setProperties(AbstractComplexEMFBinding.java:202)
at
org.geotools.xml.AbstractComplexEMFBinding.parse(AbstractComplexEMFBinding.java:143)
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:149)
... 50 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast
to net.opengis.ows11.AllowedValuesType
at
net.opengis.wps10.impl.LiteralInputTypeImpl.eSet(LiteralInputTypeImpl.java:303)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1073)
at org.geotools.xml.EMFUtils.set(EMFUtils.java:59)
at
org.geotools.xml.AbstractComplexEMFBinding.setProperty(AbstractComplexEMFBinding.java:232)
... 53 more
Since the method works fine (!) for other processes offered by the same WPS
something inside this special process description must be wrong (or wrong in
the parsing code).
I'll attach the describeProcessResponse to this bug report.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel