On Dec 4, 2013, at 6:11 AM, Nicolas Mugnier <[email protected]> wrote:
> Hello all, > > I would like to intercept in and out SOAP Messages. > However, we have to upload/download files: thus, I would like to intercept > these SOAP Messages /without/ the attachment(s) (SOAP Messages with > attachment are too big !) > > I tried to create my own interceptors extending the CXF ones in the > different phases (PRE_STREAM, ...), however I didn't find out how to skip > the attachment... It completely depends on where in the chain and what you are trying to do. If you run after the StaxInInterceptor, then if you call the msg.getContent(XMLStreamReader.class), that stream reader would just give you access to the soap message part and not really any of the attachments. However if you explicitely ask for the attachments, then CXF will load them and such. For the most part, CXF always streams things and as long as you don’t ask for them in a way that would require them to be buffered, you should be all set. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
