Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gregturn opened this issue May 18, 2016 · 6 comments
Open

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

gregturn opened this issue May 18, 2016 · 6 comments

Comments

@gregturn
Copy link
Member

gregturn commented May 18, 2016

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

@gregturn
Copy link
Member Author

gregturn commented Feb 25, 2019

Štohanzl commented

I have the same problem on server side - schema expects xml binary, but request constains XOP include element. Any workarounds or plans to solve that?

@gregturn
Copy link
Member Author

gregturn commented Feb 25, 2019

Martin Peterka commented

See link https://github.com/mpeterka/spring-ws-mtom, Reference chapter - there are some links to similar problems.

But I think, it is still unresoved issue with no known correct workarounds.

@gregturn
Copy link
Member Author

gregturn commented Jul 1, 2019

Koen Konst commented

I'm having the exact same issue. Its either MTOM or Response/Request validation a.t.m. for us. Can we get an E.T.A. when this is going to get fixed or atleast properly looked at?

@gregturn
Copy link
Member Author

gregturn commented Jun 2, 2020

Rick van Hal commented

I'm also facing this issue. Can someone from the team shed a light on whether this will be looked at or is just not important enough?

@mpeterka
Copy link

mpeterka commented Apr 13, 2021

A have updated referenced test project: https://github.com/mpeterka/spring-ws-mtom
Problem is in latest stable Spring versions also.

@NikitaZamalyutdinov
Copy link

NikitaZamalyutdinov commented Aug 1, 2022

Hi, guys, I've not tested, but it's possible workaround

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

No branches or pull requests

3 participants