Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-93

StreamingOMSerializer#serializeXOPInclude doesn't decode cid: URLs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.2.8
    • None
    • None

    Description

      StreamingOMSerializer#serializeXOPInclude contains the following code:

      String cid = reader.getAttributeValue(null, "href");
      DataHandler dh = getDataHandler(cid, (OMAttachmentAccessor) reader);
      if (dh == null)

      { return false; }

      OMFactory omFactory = OMAbstractFactory.getOMFactory();
      OMText omText = omFactory.createOMText(dh, true);
      omText.setContentID(cid);

      This means that the contentId set on the OMText instance is incorrect: it is actually not the Content-ID, but the cid: URL. This implies that the generated XOP/MTOM message is incorrect.

      The code in serializeXOPInclude should decode the href attribute in the same way as XOPAwareStAXOMBuilder#createOMElement (which uses ElementHelper.getContentID).

      Attachments

        Issue Links

          Activity

            People

              veithen Andreas Veithen
              veithen Andreas Veithen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: