Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7438

Xml validation error with MTOM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.11
    • 3.0.15, 3.1.13
    • JAXB Databinding
    • None
    • Unknown

    Description

      We have an issue similar to CXF-7185 except in our case the cvc-type is different. We suggest the following change to DataWriterImpl:

      // CXF-1194 and CXF-7438 this hack is specific to MTOM, so pretty safe to leave in here before calling the origHandler.
      String msg = event.getMessage();
      if ((msg.startsWith("cvc-type.3.1.2") || msg.startsWith("cvc-complex-type.2.2"))
          && msg.contains(marshaller.getLastMTOMElementName().getLocalPart())) {
              return true;
      }
      

      Our xsd contains this:

      <xs:complexType name="contentElements">
          <xs:sequence>
              <xs:element name="contentElement" type="xmime:base64Binary" maxOccurs="unbounded"/>
          </xs:sequence>
      </xs:complexType>
      

      Without MTOM enabled everything ist fine, with MTOM enabled the error occurs.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            cbiever Casper Biever
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: