[
https://issues.apache.org/jira/browse/CAMEL-11370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125522#comment-16125522
]
Joerg Kessler commented on CAMEL-11370:
---------------------------------------
I did some further analysis. I am at the moment only referring to Camel 2.17.4
and CXF 3.1.9. I changed CXF so that it also accepts HybridSourceDataBinding
and not just JAXBDataBinding (patch attached). I extended
HybridSourceDataBinding so that createWriter() so that it also returns a writer
for OutputStream (same as JAXBDataBinding). The only problem left is that the
MTOM conversion seems to only work for DOMs So I added in DefaultCxfBinding a
payload conversion to Document. I have added a patch for Camel-CXF. I also
added a test that checks whether the incoming message contains an attachment.
Without the modifications the test fails. Existing tests in Camel-CXF add this
attachment as part of the test. But the problem is that HybridSourceDataBinding
affects the MTOM conversion and therefore the complete processing must be
tested. All existing tests are executed sucessfully with the above
modifications.
All in all it seems that the intrduction of HybridSourceDataBinding destroyed
the ability to convert to MTOM format. What I implemented here is only a kind
of repair. I am not sure whether this will have no side effects. My knowledge
on this complex topic of payload conversion is rather limited. If you agree to
this modification I can provide 'real' patches for the actual releases.
> Problem with MTOM in Camel-CXF
> ------------------------------
>
> Key: CAMEL-11370
> URL: https://issues.apache.org/jira/browse/CAMEL-11370
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf
> Reporter: Joerg Kessler
> Priority: Minor
> Attachments:
> accept-also-sub-classes-of-orgapachecxfjaxbJAXBDataB.patch,
> MTOM-conversion.patch, mtom.test.zip
>
>
> I originally opened the issue on CXF:
> https://issues.apache.org/jira/browse/CXF-7388
> but ther CXF guys think the problem is in camel-cxf. Please have a look at
> this ticket. Basically the MTOM conversion seems not to work anymore when
> using CXF in Camel. I provided a unit test that demonstrates the observed
> behaviour.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)