Hi Sergey, I apologize but I have not been accurate in my last comment. In that old post in the last comment Dan said that I could create an interceptor, attach it "At the VERY VERY end of the in chain" and iterate on the attachments to get inpustream and close it to force the deletion. He didn't speck at all about the hold/release on the temporary files. To force the deletion of temporary files at that time we could avoid to create an interceptor to close the stream and we found a simpler way but we'll implement it is as soon as necessary.
Now, if I would like to implement two custom interceptors to manager the holdTempFile/releaseTempFile on the attachments I have yet to discover: - how to access from an interceptor to the list of attachments in the message (Dan said it is possibile in that post). - in what phase attach the interceptor to apply the CachedOutputStream.holdTempFile() on every attachment in the list. Perhaps if the attachment is not already "cached" but "delegated" I have also to force a "get inputstream". - in what phase attach the interceptor to apply the org.apache.cxf.io.CachedOutputStream.releaseTempFileHold() on every attachment in the list and than open/close the stream to allow the deletion of the temporary file to happen. Thank you very much. Stefano -- View this message in context: http://cxf.547215.n5.nabble.com/Empty-stream-when-reading-twice-the-content-of-an-attachment-greater-than-100KB-tp5745031p5745060.html Sent from the cxf-user mailing list archive at Nabble.com.
