You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Casper Biever (JIRA)" <ji...@apache.org> on 2017/07/04 14:17:00 UTC

[jira] [Created] (CXF-7438) Xml validation error with MTOM

Casper Biever created CXF-7438:
----------------------------------

             Summary: Xml validation error with MTOM
                 Key: CXF-7438
                 URL: https://issues.apache.org/jira/browse/CXF-7438
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 3.1.11
            Reporter: Casper Biever
            Priority: Minor


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

{code}
            // CXF-1194 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;
            }
{code}

Our xsd contains this:

{code language=xml}
	<xs:complexType name="contentElements">
		<xs:sequence>
			<xs:element name="contentElement" type="xmime:base64Binary" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
{code}

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



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)