Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-686

Cannot execute query via Drupal CMIS API client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • OpenCMIS 0.9.0
    • OpenCMIS 0.10.0
    • opencmis-commons
    • None

    Description

      Using the Query module of version 7.x-1.3 of the Drupal CMIS API client, a query fails against a server built using OpenCMIS 0.9.0.

      This is down to two issues:

      1) The Drupal CMIS API client now wraps the query in a CDATA section in the XML that's POSTed to the server. The XMLUtils.readText method does not handle the XMLStreamReader.CDATA event; as a result, an empty statement string is returned.

      2) The Drupal CMIS API client can also send empty XML elements for the options searchAllVersions, includeAllowableActions, etc. Unfortunately the XML parser interprets these as empty strings (rather than null values). The various read... methods in XMLWalker (readBoolean, readInteger, readDecimal, readDateTime) should return a null value if the text is interpreted as an empty string; for example:

      protected Boolean readBoolean(final XMLStreamReader parser) throws XMLStreamException {
          String value = readText(parser);
          if (value == null || "".equals(value)) {
              return null;
          }
          ...
      

      Attachments

        Issue Links

          Activity

            People

              fmui Florian Müller
              gairey Alan Gairey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: