[SWS-958] Soap MTOM: mtomEnabled=true and XSD schemas=... fails Created: 18/May/16  Updated: 18/May/16

Status: Open
Project: Spring Web Services
Component/s: XML
Affects Version/s: 2.3.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Martin Peterka Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: mtom, webservices, xsd
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

OS: Win, Linux

Reference URL: https://github.com/mpeterka/spring-ws-mtom


Setting mtomEnabled=true and schemas=... causes error:

spring-ws-content.xml fragment
	<bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
                <!-- .... -->
		<property name="schemas" ref="xsdList"/>
		<property name="mtomEnabled" value="true"/>
	<bean id="xsdList" class="org.springframework.beans.factory.config.ListFactoryBean">
               <!-- ... -->
XSD fragment
     <xs:element name="content" type="xs:base64Binary">
[org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; cvc-type.3.1.2: Element 'ns2:content' is a simple type, so it must have no element information item [children].]

It seems that validation against XSD was done after MTOM data replacement.

Sample project is here:
(Error is in cz.datalite.spring.mtom.client.WebServiceClientTest#testMarshall call.)

Expected behaviour is:

  1. Validate XML message according to XSD.
  2. Replace content of data element with MTOM include tag.
  3. Send SOAP message.

Disabling message validation is only known workaround.

Generated at Mon Oct 22 15:34:34 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.