I'm not sure how you do it with JAX-WS proxies, please check the archives/search, you'd probably cast it to the CXF JAX-WS ClientImpl and then set a property on the request context, something like that.

Or register a custom out interceptor which will sit before AttachmentOutInterceptor and which will do message.put(Message.CONTENT_TRANSFER_ENCODING, true).

Cheers, Sergey
On 26/01/17 05:08, Rodney Kite wrote:
I am now running CXF 3.1.6.

How do you set Message.CONTENT_TRANSFER_ENCODING ?   I created an Out 
Interceptor that inherits from AttachmentOutInterceptor.   There is no value 
that exists in  message.get(Message.CONTENT_TRANSFER_ENCODING) in the 
handleMessage function.

ThanksRodney

      From: Sergey Beryozkin <[email protected]>
 To: [email protected]
 Sent: Wednesday, January 25, 2017 6:55 AM
 Subject: Re: CXF overriding Content-Transfer-Encoding in MTOM attachement

Hi

Not sure about CXF 3.0.6, but the latest code shows that
AttachmentOutInterceptor checks a message contextual property,
Message.CONTENT_TRANSFER_ENCODING, and if it is set it propagates it to
AttachmentSerializer

Try the latest CXF 3.0.x

Sergey
On 25/01/17 06:34, Rodney Kite wrote:

I'm using JBoss/Wildfly 10.1 which includes CXF 3.0.6.  I'm building a soap client for an 
IRS web site.  The IRS states to use a MTOM attachement to send an XML document.  My 
content type header is Content-Type: multipart/related; 
type="application/xop+xml".    It appears in CXF if application/xop+xml is set 
then it will always put Content-Transfer-Encoding: binary in the MTOM attachement headers 
but the IRS states they want 7bit and 8bit.
I have created an Out Interceptor which allows me to set some headers but the 
content transfer encoding in the attachement is always set to binary.

Does anyone know how to stop CXF from overriding the Content-Transfer-Encoding: 
8bit setting?

ThanksRodney
















--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Reply via email to