cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casper Biever (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-7438) Xml validation error with MTOM
Date Tue, 04 Jul 2017 14:19:00 GMT

     [ https://issues.apache.org/jira/browse/CXF-7438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Casper Biever updated CXF-7438:
-------------------------------
    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:

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

  was:
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 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;
            }
{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.


> 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 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;
> }
> {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)

Mime
View raw message