cxf icon indicating copy to clipboard operation
cxf copied to clipboard

CXF-8706: CXF MTOM handler allow content injection

Open reta opened this issue 3 years ago • 6 comments

CXF MTOM handler allow content injection

reta avatar Jun 19 '22 15:06 reta

@deki wondering if you have time to check this one out, thank you!

reta avatar Jun 21 '22 02:06 reta

I don't think this is the "right" fix for this. The Soap w/ Attachement spec allows for http URL's for the cid and actually shows that use in the examples ( https://www.w3.org/TR/SOAP-attachments/ ). Thus, I think the better fix would be to pass a flag into LazyDataSource to allow flipping to URLDataSource if the CID isn't present as a direct attachment.

dkulp avatar Jun 24 '22 14:06 dkulp

Thus, I think the better fix would be to pass a flag into LazyDataSource to allow flipping to URLDataSource if the CID isn't present as a direct attachment.

@dkulp thanks, I think I got your idea, but it solves a bit different problem: it does not help with the original issue, namely to limit href scheme cid: usage for xop:include, unless I am missing something ...

reta avatar Jun 24 '22 17:06 reta

The main issue is that SOAP w/ Attachments doesn't have that limitation. Thus, applying that limitation in AttachmentUtils is not the right place unless an extra flag is passed in to enable/disable the check and that's just set for the xop cases.

dkulp avatar Jun 24 '22 17:06 dkulp

The main issue is that SOAP w/ Attachments doesn't have that limitation. Thus, applying that limitation in AttachmentUtils is not the right place unless an extra flag is passed in to enable/disable the check and that's just set for the xop cases.

Exactly, I am looking at how to distinguish xop / non-xop cases, this information is "lost" when MTOM decorator calls AttachmentUnmarshaller::getAttachmentAsDataHandler (if you have something in mind, please share), thanks!

reta avatar Jun 24 '22 18:06 reta

@dkulp relied on isXOPPackage() flag of the AttachmentUnmarshaller to distinguish xop / non-xop cases, what do you think of it? Thank you!

reta avatar Jun 24 '22 18:06 reta