[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
Environment:

OS: Win, Linux
JDK8


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

 Description   

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>
	<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:
https://github.com/mpeterka/spring-ws-mtom
(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 Dec 18 12:41:48 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.