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.
Thanks
Asif
Request clarification before answering.
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)->PI (PIDX invoice and pick a pdf file from ftp and attach it to the invoice - this was in the adapter module)-> RNIF.
Regards
Asif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
VKjoat
Below is the code snippet to do the attachment. This is just part of the code, you need to create the complete module. Refer the links below to create your module.
Object obj = null; // Handler to get Principle data
Message msg = null; // Handler to get Message object
//Get the Principal data...
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
Payload payload = msg.createPayload();
payload.setContentType("application/pdf");
payload.setContent(file.getBytes());
payload.setAttribute("Content-ID", "[email protected].");
payload.setName("filename");
msg.addAttachment(payload);
inputModuleData.setPrincipalData(msg);
Links:
http://scn.sap.com/docs/DOC-3816
Regards
Asif
Hi,
Our scenario is ECC (idoc)->PI (PIDX invoice )-> RNIF. We want to change Content-Transfer-Encoding from binary to 8 bit. Can you please let me know how we can update Encoding in PIDX message?
Currently we can see binary in PIDX message but receiver wants it to be 8 bit.
Thanks and Regards,
Prachi
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.