On Jun 25, 2013, at 3:57 AM, David Karlsen <[email protected]> wrote:
> Answering myself - found this: > https://issues.apache.org/jira/browse/CXF-4930 > will try that. Yep. Try a different phase. :-) Dan > > > 2013/6/25 David Karlsen <[email protected]> > >> No-one? Then I recon it's a bug. >> >> >> 2013/6/24 David Karlsen <[email protected]> >> >>> Hi. >>> >>> I have this out/outFault interceptor: >>> >>> public Sorp3Interceptor() >>> throws JAXBException >>> { >>> super( Phase.POST_PROTOCOL, EDBHeaderType.class ); >>> } >>> >>> public void handleMessage( SoapMessage message ) >>> throws Fault >>> { >>> if ( isRequestor( message ) ) >>> { >>> logger.warn( "Wrongly configured - this interceptor should >>> only be used serverside for outbound messages (e.g. replies) - ignoring" ); >>> return; >>> } >>> >>> @SuppressWarnings( "unchecked" ) >>> Map<String, List<String>> headers = (Map<String, List<String>>) >>> message.get( Message.PROTOCOL_HEADERS ); >>> >>> if ( headers == null ) >>> { >>> headers = Maps.newTreeMap( String.CASE_INSENSITIVE_ORDER ); >>> message.put( Message.PROTOCOL_HEADERS, headers ); >>> } >>> >>> headers.put( "X-sorp", Arrays.asList( getSorp3HeaderValue( >>> message ) ) ); >>> } >>> >>> >>> it works fine, but we see that when the response is so large that it's >>> streamed via file (e.g reaching the threshold for CachedOutputStream) it's >>> not actually received by the client: >>> >>> >>> E.g. this one will lack the header when received by client: >>> ID: 6 >>> Encoding: UTF-8 >>> Content-Type: text/xml >>> Headers: {X-sorp=[anonymized]} >>> Messages: Outbound Message (saved to tmp file): >>> Filename: /tmp/cxf-tmp-250758/cos4006683562610207802tmp >>> (message truncated to 102400 bytes) >>> >>> >>> this one works as designed: >>> >>> ID: 7 >>> Encoding: UTF-8 >>> Content-Type: text/xml >>> Headers: {X-sorp=[anonymized]} >>> Payload: <soap:Envelope ... >>> >>> >>> >>> >>> >>> -- >>> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen >>> >> >> >> >> -- >> -- >> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen >> > > > > -- > -- > David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
