How do I override the handleMessage if I don't extend it? I left out the
constructor.
public EntAttachmentOutInterceptor() {
super();
}
From: Sergey Beryozkin <[email protected]>
To: [email protected]
Sent: Monday, January 30, 2017 5:33 AM
Subject: Re: CXF overriding Content-Transfer-Encoding in MTOM attachement 7bit
and 8bit
Does this interceptor run before the actual AttachmentOutInterceptor
which CXF uses ? (You probably do not need to extend it.)
Sergey
On 30/01/17 04:43, Rodney Kite wrote:
>
>
>
> I'm using JBoss/Wildfly 10.1 which includes CXF 3.1.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". The client is supposed to have 2
> Content-Transfer-Encoding headers one set to 8bit before the soap envelope
> and the other set to 7bit in the Content-Transfer-Encoding before the
> attachment.
> The following Interceptor puts 8bit in both CONTENT_TRANSFER_ENCODINGs in the
> header. How do I make one before the envelope 8bit and attachments 7bit?
> public class EntAttachmentOutInterceptor extends AttachmentOutInterceptor {
> @Override
> public void handleMessage(Message message){
> message.put(Message.CONTENT_TRANSFER_ENCODING, "8bit");
> }
> }
>
>
> Here is an example of what they want. I don't know how to get the
> attachments Content-Transfer-Encoding to be different value.
> ---------------------------
> ID: 3
> Address: https://la.www4.irs.gov/airp/aca/a2a/1095BC_Transmission_AATS
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: multipart/related; type="application/xop+xml";
> boundary="uuid:4b92f285-b0d8-49d3-9b9e-b7d8067a124c";
> start="<[email protected]>"; start-info="text/xml"
> Headers: {Accept=[*/*], Accept-Encoding=[gzip,deflate,gzip;q=1.0, identity;
> q=0.5, *;q=0], Connection=[Keep-Alive], Content-Encoding=[gzip],
> HOST=[www.polardocs.com], MIME-Version=[1.0],
> SOAPAction=["BulkRequestTransmitter"]}
> Payload: --uuid:4b92f285-b0d8-49d3-9b9e-b7d8067a124c
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: 8bit
> Content-ID: <[email protected]>
>
> <soapenv:Envelope>Removed Stuff</soapenv:Envelope>
> --uuid:4b92f285-b0d8-49d3-9b9e-b7d8067a124c
> Content-Type: text/xml; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Content-ID:
> <f059a2f0-585e-475b-bf00-90adb744bcb3-3@urn:us:gov:treasury:irs:common>
> Content-Disposition: attachment;
> name="1094C_Request_BBBLP_20170130T040244203Z.xml"
>
> <?xml version="1.0"
> encoding="UTF-8"?><n1:Form109495CTransmittalUpstream>Removed
> Stuff</n1:Form109495CTransmittalUpstream>
> --uuid:4b92f285-b0d8-49d3-9b9e-b7d8067a124c--
> --------------------------------------
>
>
>
>
>
> ThanksRodney
>
>
>
>
>
>
>
>
>
>
>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/