Panu Hämäläinen created CXF-7249:
------------------------------------

             Summary: Custom HTTP headers ignored in service responses when 
using MTOM with JAX-WS and JAXB
                 Key: CXF-7249
                 URL: https://issues.apache.org/jira/browse/CXF-7249
             Project: CXF
          Issue Type: Bug
    Affects Versions: 3.1.8
            Reporter: Panu Hämäläinen


I have set up a CXF server endpoint (v. 3.1.8) using JAX-WS with JAXB 
databinding and MTOM. Everything else works correctly but the custom HTTP 
headers that I add with an outbound interceptor to the response messages seem 
to disappear. The custom headers are in place for other than MTOM-enabled 
endpoint responses. I have followed the guidance (see 1) in my interceptor 
which adds the headers ("prior to WRITE phase").

I suspect the problem is in AttachmentOutInterceptor (see 2) as it does not 
respect the headers possibly specified by other interceptors ("root headers" 
are always empty)? I guess the "root headers" should be initialized from the 
current message state.

I also tried (against the mentioned guidance) adding my interceptor after 
AttachmentOutInterceptor (and also after AttachmentOutInterceptor# 
AttachmentOutEndingInterceptor) but it did not help.

1) 
https://issues.apache.org/jira/browse/CXF-5573?focusedCommentId=13907135&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13907135
2) 
https://github.com/apache/cxf/blob/cxf-3.1.8/core/src/main/java/org/apache/cxf/interceptor/AttachmentOutInterceptor.java#L96




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to