cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hämäläinen Panu <panu.hamalai...@insta.fi>
Subject Custom HTTP headers ignored when using MTOM with JAX-WS and JAXB
Date Fri, 10 Feb 2017 06:34:00 GMT
Hello,

(My problem came up with "MTOM with DOSGi" thread, you can find some background there if needed.)

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 (1) in my interceptor which
adds the headers ("prior to WRITE phase").

I suspect the problem is in AttachmentOutInterceptor (2) as it does not respect the headers
possibly specified by other interceptors ("root headers" are always empty)?

Is there a way to overwrite/remove the default AttachmentOutInterceptor in the interceptor
chain without actually changing the CXF code? I could extend the class and make the protected
method (2) work correctly if the problem is what I suspect.

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

Regards,
Panu

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message