Dear CXF Gurus and Community!

I want to consume a multipart/mixed payload via a stream like shown in the 
example code below. Unfortunately it seems that injected stream is already 
closed and can not be used anymore. Debugging CXF shows that a 
MailAttachmentInterceptor has taken the stream before it is injected. Is there 
an option to avoid that behavior?

Thanks in advance.

Greetings,
Stephan


    @POST
    @Consumes("multipart/mixed")
    @Produces("multipart/mixed")
    public StreamingOutput createItem(InputStream requestBodyStream) {
        /* read the requestBodyStream like a normal input stream */
        return new StreamingOutput() {

            public void write(OutputStream output) throws IOException, 
WebApplicationException {
                byte[] out = /* get some bytes to write */
                output.write(out);
            }
        })
    }

Reply via email to