spring-projects / spring-integration

Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns (EIP)
http://projects.spring.io/spring-integration/
Apache License 2.0
1.55k stars 1.11k forks source link

MTOM attachment lost by SimpleWebServiceInboundGateway [INT-3775] #7726

Closed spring-operator closed 9 years ago

spring-operator commented 9 years ago

Mauro Molinari opened INT-3775 and commented

I don't know if this is a bug or an unavoidable problem (in which case, probably a mention in the documentation would be useful). I want to receive a message from a web service inbound gateway and unmarshal it with JAXB2. The incoming message contains a MTOM attachment.

Given that I have configured Spring Web Services and my JAXB2 unmarshaller in order to enable MTOM support, I then have two possibilities:

The second solution may allow to perform some extra processing between the receiving of the SOAP message body and its unmarshalling and in any case (if no such extra processing is performed) I would expect it to be equivalent to the first solution. But what I observe is that in the second case the MTOM attachment is lost: the InputStream of the DataHandler of the field corresponding to the XSD element of the binary attachment in the JAXBElement instance that constitutes the unmarshalled payload, returns no bytes. The rest of the XML message is intact.


Affects: 4.1.6

Issue Links:

spring-operator commented 9 years ago

Artem Bilan commented

Mauro, please, find the linked #5742 ticket with the same premise. Right, that one is as New Feature not Bug, but it would be better do not treat it as a bug, because the SimpleWebServiceInboundGateway says for itself :).

So, let's continue our discussion from there! I close this one as superseded.

spring-operator commented 9 years ago

Artem Bilan commented

Duplicates #5742