<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Change Content Encoding to base64 in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200342#M2596136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ALL &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We are able do attachment using UDF Need help for updating Content-Transfer-Encoding:&lt;STRONG&gt; Binary&lt;/STRONG&gt;&amp;nbsp; to &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&lt;STRONG&gt;base64&lt;/STRONG&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Content-Type: application/pdf&lt;/P&gt;&lt;P&gt;Content-Transfer-Encoding: base64&lt;/P&gt;&lt;P&gt;content-id: &amp;lt;Attachment0&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2013 02:06:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-06-06T02:06:41Z</dc:date>
    <item>
      <title>Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaq-p/7200320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a module to encode a pdf attachment to base64. When I see it the receiver channel the encoding says binary. How can I change the content encoding to base64.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Asif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Aug 2010 00:27:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaq-p/7200320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-13T00:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200321#M2596115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; I have created a module to encode a pdf attachment to base64. When I see it the receiver channel the encoding says binary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is correct. Do not change it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Aug 2010 06:34:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200321#M2596115</guid>
      <dc:creator>stefan_grube</dc:creator>
      <dc:date>2010-08-13T06:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200322#M2596116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How will the receiving system know whether I have encoded to base64 or not. If I do not encode the attachment the Content encoding is "binary" and if I encode the Content encoding is also "binary". My receiver channel is RNIF in my scenario. &lt;/P&gt;&lt;P&gt;Below is what I get in the channel for encoded as well as without encoding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Content-Type: application/pdf&lt;/P&gt;&lt;P&gt;Content-Transfer-Encoding: binary&lt;/P&gt;&lt;P&gt;Content-ID: Attachment.7017f020a66c11dfbc9f001125c0de06ATsap.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is from  the sample I received from my trading partner on how it is expected; which is what I am trying to do here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Content-Type: application/pdf&lt;/P&gt;&lt;P&gt;Content-Transfer-Encoding: base64&lt;/P&gt;&lt;P&gt;content-id: &amp;lt;Attachment0&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Aug 2010 14:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200322#M2596116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-13T14:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200323#M2596117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Content-Transfer-Encoding: base64&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is something totally different of that you have posted the first time.&lt;/P&gt;&lt;P&gt;Why you do not describe your scenario first so a reader knows what you are talking about?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I do not know this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 06:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200323#M2596117</guid>
      <dc:creator>stefan_grube</dc:creator>
      <dc:date>2010-08-16T06:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200324#M2596118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am exactly in the same situation now!!&lt;/P&gt;&lt;P&gt;When I am trying to post RNIF message to Legacy system it works when there is no attachment.&lt;/P&gt;&lt;P&gt;But when there is attachment, it doesnt work.&lt;/P&gt;&lt;P&gt;I am trying to change the "Content-Transfer-Encoding"&amp;nbsp; to base64 but finding it bit difficult.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest if you have fixed your Issue or if I can try something ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;VkJoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 20:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200324#M2596118</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-24T20:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200325#M2596119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not remember how I resolved the issue, it was awhile back. I might have sent the file as is without encoding to base64. But try setAttribute in the module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Payload payload = msg.createPayload();&lt;/P&gt;&lt;P&gt;payload.setContentType(contentType);&lt;/P&gt;&lt;P&gt;payload.setContent(file.getBytes());&lt;/P&gt;&lt;P&gt;payload.setAttribute("Content-Transfer-Encoding","base64");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works&lt;/P&gt;&lt;P&gt;Asif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 21:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200325#M2596119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-24T21:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200326#M2596120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply!!&lt;/P&gt;&lt;P&gt;Do you want me to write an Adapter module ?&lt;/P&gt;&lt;P&gt;Or&amp;nbsp; just try to handle it with payloadzipbean in the Module processor ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 22:45:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200326#M2596120</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-24T22:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200327#M2596121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please try to&amp;nbsp; recollect your solution for this problem as this has become bit critical for me now!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 19:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200327#M2596121</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-27T19:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200328#M2596122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was creating an attachment in a module, for me I had the option of sending it in base64 or binary. The solution I provided above is to be used in a module. I don't know where you are getting the attachment from. If you are getting it from the sender of the message you can ask them to send it in binary format or you could decode it in mapping then send it to to the receiver. Let me know you complete scenario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Asif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 20:02:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200328#M2596122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-27T20:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200329#M2596123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif.&lt;/P&gt;&lt;P&gt;In My Scenario,&lt;/P&gt;&lt;P&gt;PI is receiving the attachment from ECC via ABAP Proxy.&lt;/P&gt;&lt;P&gt;In SXMB_MONI, I can see the message with the attachment which is base64 encoded.&lt;/P&gt;&lt;P&gt;As, you said, I can get a binary file from ECC and try to decode it in PI.&lt;/P&gt;&lt;P&gt;So it says you have Developed&amp;nbsp; your own Adapter Module? right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;VKJoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 20:25:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200329#M2596123</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-27T20:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200330#M2596124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, mine was an adapter module to create the attachment. For ABAP Proxy sender you can try decoding it in the mapping. Create a java mapping look for the attachment then decode it and attach it back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 21:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200330#M2596124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-27T21:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200331#M2596125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif,&lt;/P&gt;&lt;P&gt;I have a question for you!!&lt;/P&gt;&lt;P&gt;If we are writing an Adapter Module to encode, we have to apply this module befpre RNIFModuleListener, so RNIFModuleListener will still change the content-encoding to Binary.&lt;/P&gt;&lt;P&gt;So, I think the two cases are same.&lt;/P&gt;&lt;P&gt;Case A: where attachment is already base64 encoded in ABAP and sent to PI and then to RNIF adapter.&lt;/P&gt;&lt;P&gt;Case B: encoding the attachment via an Adapter Module.&lt;/P&gt;&lt;P&gt; where we use the Module before RNIFModuleListener&lt;/P&gt;&lt;P&gt; .--&amp;gt;Can you please give me your opinion on the above cases ?&lt;/P&gt;&lt;P&gt;&amp;nbsp; --&amp;gt;Shall we proceed with Case B or shall we write an Adapter Module to change the Encoding from Binary to Base64 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 21:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200331#M2596125</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-28T21:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200332#M2596126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;"If we are writing an Adapter Module to encode, we have to apply this module befpre RNIFModuleListener"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, here I was suggesting trying to change Content-Transfer-Encoding:&amp;nbsp; from binary to base64.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case A - I suppose this is whats not working for you, hence the above suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case B - Here my suggestion was to decode base64 attachment and send the attachment as binary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the cases require writing a Adapter module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again the easiest solution to try is decoding the attachment via a java mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a sample java mapping, you need to change it for your requirement. This java mapping decodes a base64 data coming in the xml element PDFOutput. I use it for a scenario where ABAP proxy sends an pdf in base64 format in the xml tag PDFOutput, I decode it and put in FTP. It is not an attachment.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;package decodeAttachment.mapping;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import javax.xml.parsers.DocumentBuilder;&lt;/P&gt;&lt;P&gt;import javax.xml.parsers.DocumentBuilderFactory;&lt;/P&gt;&lt;P&gt;import javax.xml.transform.stream.StreamResult;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import org.w3c.dom.Document;&lt;/P&gt;&lt;P&gt;import org.w3c.dom.NodeList;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import sun.misc.BASE64Decoder;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import com.sap.aii.mapping.api.AbstractTransformation;&lt;/P&gt;&lt;P&gt;import com.sap.aii.mapping.api.StreamTransformationException;&lt;/P&gt;&lt;P&gt;import com.sap.aii.mapping.api.TransformationInput;&lt;/P&gt;&lt;P&gt;import com.sap.aii.mapping.api.TransformationOutput;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class DecodeAttachment extends AbstractTransformation{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void transform(TransformationInput input, TransformationOutput output) throws StreamTransformationException {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentBuilder builder = factory.newDocumentBuilder();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document docOld = builder.parse(input.getInputPayload().getInputStream());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the node name Details that contains the Based64 Encoded information..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeList details = docOld.getElementsByTagName("PDFOutPut");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the Text of Node.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String data = details.item(0).getChildNodes().item(0).getNodeValue();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Instantiate an object of BASE64Decoder...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BASE64Decoder decoder =&amp;nbsp; new BASE64Decoder();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Decode the encoded information....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte b[] = decoder.decodeBuffer(data);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StreamResult result = new StreamResult(output.getOutputPayload().getOutputStream());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result.getOutputStream().write(b);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception e){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(e);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt; "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to this blog for how to read attachment in message mapping.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message-in-the-message-mapping" title="http://scn.sap.com/people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message-in-the-message-mapping"&gt;http://scn.sap.com/people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message-in-the-message-mapping&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:00:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200332#M2596126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-29T19:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200333#M2596127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif,&lt;/P&gt;&lt;P&gt;Do you have any document for the Module that you have created ?&lt;/P&gt;&lt;P&gt;I have setup the NWDS and have also created a module but for the proper java syntax I need some assistance.&lt;/P&gt;&lt;P&gt;Can&amp;nbsp; you please give me some Java syntax for setting up just the content-transfer-encoding in the Adapter module ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 20:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200333#M2596127</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-30T20:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200334#M2596128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Asif,&lt;/P&gt;&lt;P&gt;Can you please confirm if you have achieved the content-transfer-encoding problem via an Adapter Module? (change it from base64 to binary). As, I think it is not possible because of two reasons:&lt;/P&gt;&lt;P&gt;1.The RNIFModuleListener is always executed at last so though we write an Adapter module the RNIFmodulelistener will act at last and will write the content-transfer-encoding to binary.&lt;/P&gt;&lt;P&gt;2. Stefan Grube in the following post confirms that it is not possible.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/thread/1377487" title="http://scn.sap.com/thread/1377487"&gt;http://scn.sap.com/thread/1377487&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 09:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200334#M2596128</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-31T09:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200335#M2596129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Asif,&lt;/P&gt;&lt;P&gt;Can you please confirm if you have achieved the content-transfer-encoding problem via an Adapter Module? (change it from base64 to binary). As, I think it is not possible because of two reasons:&lt;/P&gt;&lt;P&gt;1.The RNIFModuleListener is always executed at last so though we write an Adapter module the RNIFmodulelistener will act at last and will write the content-transfer-encoding to binary.&lt;/P&gt;&lt;P&gt;2. Stefan Grube in the following post confirms that it is not possible.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/thread/1377487" title="http://scn.sap.com/thread/1377487"&gt;http://scn.sap.com/thread/1377487&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 09:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200335#M2596129</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-31T09:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200336#M2596130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan Grube is probably right, changing Content-Transfer-Encoding may not be possible. As I mentioned earlier since my module was creating the attachment rather than receiving it from the sender, I had the option of doing base64 or sending it as is. Since I never got a response for this I sent the attachment as is. I used the setAttribute to change my Content-ID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Asif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 14:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200336#M2596130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-31T14:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200337#M2596131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Asif,&lt;/P&gt;&lt;P&gt;Even my scenario is same where I am sending the base64 File coming form ABAP as it is via Receiver Adapter. When you have created the attachment and sent it to receiver it means you have used Receiver RNIF. So, my question is were you able to populate Content-Transfer-Encoding to "Base" in this case ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vkjoat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 16:01:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200337#M2596131</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-31T16:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200338#M2596132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean "base64" instead of binary?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 16:02:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200338#M2596132</guid>
      <dc:creator>vk_k3</dc:creator>
      <dc:date>2012-08-31T16:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Change Content Encoding to base64</title>
      <link>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200339#M2596133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I did not change it to base64. I sent it as is, the receiving system was able read it without converting to base64. Their original sample provided by them had it as base64, but they were read the attachment as binary. My scenario was ECC (idoc)-&amp;gt;PI (PIDX invoice and pick a pdf file from ftp and attach it to the invoice - this was in the adapter module)-&amp;gt; RNIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Asif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 16:17:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/change-content-encoding-to-base64/qaa-p/7200339#M2596133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-31T16:17:16Z</dc:date>
    </item>
  </channel>
</rss>

