GeoTools
  1. GeoTools
  2. GEOT-2727

Parsing error on creating WPS factory at DecribeProcessRequest

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6-M2
    • Fix Version/s: None
    • Component/s: unsupported
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        Andrea Aime added a comment -
        Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
        Show
        Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

          People

          • Assignee:
            Justin Deoliveira
            Reporter:
            Matthias Lendholt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: