Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-1707

String features in out-of-typesystem data not normalized on service replies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.3C
    • C++ Framework
    • None

    Description

      Christoph Büscher to uima-user

      I currently encountered a problem with the XMI deserialization of a feature structure after calling a remote C++ AS annotator from a CPE. The szenario is the following:

      1. I add a custom feature structure "DocumentData" containing an String Feature (the document URL) to the CAS in my CPE. The exact URL causing the problem is:

      documentURL="http://www.gesundheitsnachrichten.net/live/navigation/live.php?navigation_id=11&_psmand=1"

      2. The CAS get's serialized to XMI before sending it to a remote C++ TAE. I added a breakpoint to UimaSerializer.serializeCasToXmi() and get the following part in the XMI string:

      documentURL="http://www.gesundheitsnachrichten.net/live/navigation/live.php?navigation_id=11&_psmand=1"

      So here the "&" character seems to be excaped correctly.

      3. When the document comes back, the same feature in the XMI string received in UimaSerializer.deserializeCasFromXmi() reads:

      documentURL="http://www.gesundheitsnachrichten.net/live/navigation/live.php?navigation_id=11&_psmand=1"

      an now the SAXParser throws the following exception:

      org.xml.sax.SAXParseException: The reference to entity "_psmand" must end with the ';' delimiter.
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.uima.aae.UimaSerializer.deserializeCasFromXmi(UimaSerializer.java:170)
      at ...

      because the "&" comes back unescaped.
      -----------------------------------

      Christoph Büscher to uima-user

      I did some further testing and the problem seems to happen when the FS is not
      declared in the remote C++ TAE but declared and set in an AE in the (lokal) main
      application (in out case a CPE running various Java AEs).
      ------------------------------------------

      Nice work Christoph!

      Attachments

        Activity

          People

            eddie_epstein Eddie Epstein
            eddie_epstein Eddie Epstein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: