Skip to content

Soap MTOM: mtomEnabled=true and XSD schemas=... fails [SWS-958] #1030

Description

@gregturn

Martin Peterka opened SWS-958 and commented

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

<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">
          <!-- ... -->
<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.


Affects: 2.3.0

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

2 votes, 5 watchers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions