Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 2d6e4e9cb -> 528fd9240
[CXF-7438] Expand the checks for MTOM and schema validation Patch from Casper Biever applied # Conflicts: # core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2d90e1e7 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2d90e1e7 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2d90e1e7 Branch: refs/heads/3.0.x-fixes Commit: 2d90e1e71db008042f3b6818ac380df56af99610 Parents: 2d6e4e9 Author: Daniel Kulp <dk...@apache.org> Authored: Tue Aug 1 14:31:09 2017 -0400 Committer: Daniel Kulp <dk...@apache.org> Committed: Wed Sep 6 09:31:04 2017 -0400 ---------------------------------------------------------------------- .../src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/2d90e1e7/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java ---------------------------------------------------------------------- diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java index 77563a9..a14a32e 100644 --- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java +++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java @@ -97,9 +97,10 @@ public class DataWriterImpl<T> extends JAXBDataBase implements DataWriter<T> { } public boolean handleEvent(ValidationEvent event) { - // CXF-1194 this hack is specific to MTOM, so pretty safe to leave in here before calling the origHandler. + // CXF-1194/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") + if ((msg.startsWith("cvc-type.3.1.2") || msg.startsWith("cvc-complex-type.2.2")) && msg.contains(marshaller.getLastMTOMElementName().getLocalPart())) { return true; }